mirror of
https://github.com/rancher/steve.git
synced 2025-09-03 08:25:13 +00:00
Move lasso SQL cache in Steve (#452)
* Copy pkg/cache/sql from lasso to pkg/sqlcache * Rename import from github.com/rancher/lasso/pkg/cache/sql to github.com/rancher/steve/pkg/sqlcache * Fix filter.Match -> filter.Matches * go mod tidy * Fix lint errors * Remove lasso SQL cache mentions * Fix more CI lint errors * fix goimports Signed-off-by: Silvio Moioli <silvio@moioli.net> * fix tests (Match -> Matches) Signed-off-by: Silvio Moioli <silvio@moioli.net> * Fix Sort order --------- Signed-off-by: Silvio Moioli <silvio@moioli.net> Co-authored-by: Silvio Moioli <silvio@moioli.net>
This commit is contained in:
24
pkg/sqlcache/partition/partition.go
Normal file
24
pkg/sqlcache/partition/partition.go
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Package partition represents listing parameters. They can be used to specify which namespaces a caller would like included
|
||||
in a response, or which specific objects they are looking for.
|
||||
*/
|
||||
package partition
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
)
|
||||
|
||||
// Partition represents filtering of a request's results
|
||||
type Partition struct {
|
||||
// if true, do not apply any filtering, return all results. Overrides all other fields
|
||||
Passthrough bool
|
||||
|
||||
// if non-empty, only resources in the specified namespaces will be returned
|
||||
Namespace string
|
||||
|
||||
// if true, return all results, while still honoring Namespace. Overrides Names
|
||||
All bool
|
||||
|
||||
// if non-empty, only resources with matching names will be returned
|
||||
Names sets.Set[string]
|
||||
}
|
Reference in New Issue
Block a user