package
0.8.7
Repository: https://github.com/coding-hui/common.git
Documentation: pkg.go.dev

# Functions

AreLabelsInWhiteList verifies if the provided label list is in the provided whitelist and returns true, otherwise false.
Conflicts takes 2 maps and returns true if there a key match between the maps but the value doesn't match, and returns false in other cases.
ConvertSelectorToLabelsMap converts selector string to labels map and validates keys and values.
Equals returns true if the given maps are equal.
Everything returns a selector that matches all labels.
FormatLabels convert label map into plain string.
Merge combines given maps, and does not check for any conflicts between the maps.
NewRequirement is the constructor for a Requirement.
NewSelector returns a nil selector.
Nothing returns a selector that matches no labels.
Parse takes a string representing a selector and returns a selector object, or an error.
ParseToRequirements takes a string representing a selector and returns a list of requirements.
SelectorFromSet returns a Selector which will match exactly the given Set.
SelectorFromValidatedSet returns a Selector which will match exactly the given Set.
ValidatedSelectorFromSet returns a Selector which will match exactly the given Set.

# Constants

ClosedParToken represents close parenthesis.
CommaToken represents the comma.
DoesNotExistToken represents logic not.
DoubleEqualsToken represents double equals.
EndOfStringToken represents end of string.
EqualsToken represents equal.
ErrorToken represents scan error.
GreaterThanToken represents greater than.
IdentifierToken represents identifier, e.g.
InToken represents in.
KeyAndOperator represents key and operator.
LessThanToken represents less than.
NotEqualsToken represents not equal.
NotInToken represents not in.
OpenParToken represents open parenthesis.
Values represents values.

# Structs

Lexer represents the Lexer struct for label selector.
Parser data structure contains the label selector parser data structure.
Requirement contains values, a key, and an operator that relates the key and values.
ScannedItem contains the Token and the literal produced by the lexer.

# Interfaces

Labels allows you to present labels independently from their storage.
Selector represents a label selector.

# Type aliases

ByKey sorts requirements by key to obtain deterministic parser.
ParserContext represents context during parsing: some literal for example 'in' and 'notin' can be recognized as operator for example 'x in (a)' but it can be recognized as value for example 'value in (in)'.
Requirements is AND of all requirements.
Set is a map of label:value.
Token represents constant definition for lexer token.