kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector.go

type Selector

type nothingSelector

func (n nothingSelector) Matches(_ Fields) bool      {}

func (n nothingSelector) Empty() bool                {}

func (n nothingSelector) String() string             {}

func (n nothingSelector) Requirements() Requirements {}

func (n nothingSelector) DeepCopySelector() Selector {}

func (n nothingSelector) RequiresExactMatch(field string) (value string, found bool) {}

func (n nothingSelector) Transform(fn TransformFunc) (Selector, error) {}

// Nothing returns a selector that matches no fields
func Nothing() Selector {}

// Everything returns a selector that matches all fields.
func Everything() Selector {}

type hasTerm

func (t *hasTerm) Matches(ls Fields) bool {}

func (t *hasTerm) Empty() bool {}

func (t *hasTerm) RequiresExactMatch(field string) (value string, found bool) {}

func (t *hasTerm) Transform(fn TransformFunc) (Selector, error) {}

func (t *hasTerm) Requirements() Requirements {}

func (t *hasTerm) String() string {}

func (t *hasTerm) DeepCopySelector() Selector {}

type notHasTerm

func (t *notHasTerm) Matches(ls Fields) bool {}

func (t *notHasTerm) Empty() bool {}

func (t *notHasTerm) RequiresExactMatch(field string) (value string, found bool) {}

func (t *notHasTerm) Transform(fn TransformFunc) (Selector, error) {}

func (t *notHasTerm) Requirements() Requirements {}

func (t *notHasTerm) String() string {}

func (t *notHasTerm) DeepCopySelector() Selector {}

type andTerm

func (t andTerm) Matches(ls Fields) bool {}

func (t andTerm) Empty() bool {}

func (t andTerm) RequiresExactMatch(field string) (string, bool) {}

func (t andTerm) Transform(fn TransformFunc) (Selector, error) {}

func (t andTerm) Requirements() Requirements {}

func (t andTerm) String() string {}

func (t andTerm) DeepCopySelector() Selector {}

// SelectorFromSet returns a Selector which will match exactly the given Set. A
// nil Set is considered equivalent to Everything().
func SelectorFromSet(ls Set) Selector {}

var valueEscaper

// EscapeValue escapes an arbitrary literal string for use as a fieldSelector value
func EscapeValue(s string) string {}

type InvalidEscapeSequence

func (i InvalidEscapeSequence) Error() string {}

type UnescapedRune

func (i UnescapedRune) Error() string {}

// UnescapeValue unescapes a fieldSelector value and returns the original literal value.
// May return the original string if it contains no escaped or special characters.
func UnescapeValue(s string) (string, error) {}

// ParseSelectorOrDie takes a string representing a selector and returns an
// object suitable for matching, or panic when an error occur.
func ParseSelectorOrDie(s string) Selector {}

// ParseSelector takes a string representing a selector and returns an
// object suitable for matching, or an error.
func ParseSelector(selector string) (Selector, error) {}

// ParseAndTransformSelector parses the selector and runs them through the given TransformFunc.
func ParseAndTransformSelector(selector string, fn TransformFunc) (Selector, error) {}

type TransformFunc

// splitTerms returns the comma-separated terms contained in the given fieldSelector.
// Backslash-escaped commas are treated as data instead of delimiters, and are included in the returned terms, with the leading backslash preserved.
func splitTerms(fieldSelector string) []string {}

const notEqualOperator

const doubleEqualOperator

const equalOperator

var termOperators

// splitTerm returns the lhs, operator, and rhs parsed from the given term, along with an indicator of whether the parse was successful.
// no escaping of special characters is supported in the lhs value, so the first occurrence of a recognized operator is used as the split point.
// the literal rhs is returned, and the caller is responsible for applying any desired unescaping.
func splitTerm(term string) (lhs, op, rhs string, ok bool) {}

func parseSelector(selector string, fn TransformFunc) (Selector, error) {}

// OneTermEqualSelector returns an object that matches objects where one field/field equals one value.
// Cannot return an error.
func OneTermEqualSelector(k, v string) Selector {}

// OneTermNotEqualSelector returns an object that matches objects where one field/field does not equal one value.
// Cannot return an error.
func OneTermNotEqualSelector(k, v string) Selector {}

// AndSelectors creates a selector that is the logical AND of all the given selectors
func AndSelectors(selectors ...Selector) Selector {}