Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabelSelector ¶
type LabelSelector struct {
Requirements []Requirement
}
LabelSelector is a set of label requirements
func Parse ¶
func Parse(input io.Reader) (LabelSelector, error)
Parse parses a label selector expression
func ParseString ¶
func ParseString(str string) (LabelSelector, error)
ParseString parses a label selector expression from a string
type Operation ¶
type Operation string
const ( OperationIn Operation = "in" OperationNotIn Operation = "notIn" OperationExists Operation = "exists" OperationEquals Operation = "equals" OperationNotExists Operation = "notExist" OperationNotEquals Operation = "notEquals" OperationLowerThan Operation = "lowerThan" OperationGreaterThan Operation = "greaterThan" OperationLowerThanEqual Operation = "lowerThanEqual" OperationGreaterThanEqual Operation = "greaterThanEqual" )
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is capable of parsing a label selector expression
func (*Parser) Parse ¶
func (p *Parser) Parse() (LabelSelector, error)
Parse actually parses the input and returns the resulting LabelSelector
type Requirement ¶
type Token ¶
type Token int
Token represents a lexical token.
const ( ILLEGAL Token = iota EOF // end of file WS // whitespace IDENT // identifier COMMA // , EXCLAMATION_MARK // ! IN // in NOT_IN // notin EQUAL // = or == NOT_EQUAL // != OPENING_BRACKET // ( CLOSING_BRACKET // ) LOWER_THAN // < LOWER_THAN_EQUAL // <= GREATER_THAN // > GREATER_THAN_EQUAL // >= )
Click to show internal directories.
Click to hide internal directories.