kubernetes/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go

type AttrFunc

type FieldMutationFunc

func DefaultClusterScopedAttr(obj runtime.Object) (labels.Set, fields.Set, error) {}

func DefaultNamespaceScopedAttr(obj runtime.Object) (labels.Set, fields.Set, error) {}

func (f AttrFunc) WithFieldMutation(fieldMutator FieldMutationFunc) AttrFunc {}

type SelectionPredicate

// Matches returns true if the given object's labels and fields (as
// returned by s.GetAttrs) match s.Label and s.Field. An error is
// returned if s.GetAttrs fails.
func (s *SelectionPredicate) Matches(obj runtime.Object) (bool, error) {}

// MatchesObjectAttributes returns true if the given labels and fields
// match s.Label and s.Field.
func (s *SelectionPredicate) MatchesObjectAttributes(l labels.Set, f fields.Set) bool {}

// MatchesSingleNamespace will return (namespace, true) if and only if s.Field matches on the object's
// namespace.
func (s *SelectionPredicate) MatchesSingleNamespace() (string, bool) {}

// MatchesSingle will return (name, true) if and only if s.Field matches on the object's
// name.
func (s *SelectionPredicate) MatchesSingle() (string, bool) {}

// Empty returns true if the predicate performs no filtering.
func (s *SelectionPredicate) Empty() bool {}

// For any index defined by IndexFields, if a matcher can match only (a subset)
// of objects that return <value> for a given index, a pair (<index name>, <value>)
// wil be returned.
func (s *SelectionPredicate) MatcherIndex(ctx context.Context) []MatchValue {}

func isNamespaceScopedRequest(ctx context.Context) (string, bool) {}

// LabelIndex add prefix for label index.
func LabelIndex(label string) string {}

// FiledIndex add prefix for field index.
func FieldIndex(field string) string {}