package
0.0.0-20220608003731-3bf80463e334
Repository: https://github.com/opsdata/common-base.git
Documentation: pkg.go.dev

# Functions

AndSelectors - create a selector that is the logical AND of all the given selectors.
EscapeValue escapes an arbitrary literal string for use as a fieldSelector value.
Everything returns a selector that matches all fields.
Nothing returns a selector that matches no fields.
OneTermEqualSelector - return an object that match objects where one field/field equals one value - can not return an error.
OneTermNotEqualSelector - return an object that match objects where one field/field does not equal one value - can not return an error.
ParseAndTransformSelector - parse the selector and run them through the given TransformFunc.
ParseSelector - take a string representing a selector and returns an object suitable for matching - or an error.
ParseSelectorOrDie - take a string representing a selector and return an object suitable for matching - or panic when an error occur.
SelectorFromSet - return a Selector which will match exactly the given Set - a nil Set is considered equivalent to Everything().
UnescapeValue - unescape a fieldSelector value and return the original literal value - may return the original string if it contains no escaped or special characters.

# Structs

InvalidEscapeSequence indicates an error occurred unescaping a field selector.
Requirement contains a field, a value, and an operator that relates the field and value.
UnescapedRune indicates an error occurred unescaping a field selector.

# Interfaces

Fields allows you to present fields independently from their storage.
Selector represents a field selector.

# Type aliases

Requirements is AND of all requirements.
Set - a map of field:value - it implements Fields.
TransformFunc transforms selectors.