Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct { Key string `json:"key" yaml:"key"` Operator Operator `json:"operator" yaml:"operator"` Values []string `json:"values" yaml:"values"` }
func (*Operation) Validate ¶
Validate Operation. If any of these rules is violated, an error is returned:
- The operator can only be In, NotIn, Equals, DoubleEquals, Gt, Lt, NotEquals, Exists, or DoesNotExist.
- If the operator is In or NotIn, the values set must be non-empty.
- If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value.
- If the operator is Exists or DoesNotExist, the value set must be empty.
- If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer.
- The key is invalid due to its length, or sequence of characters. See validateLabelKey for more details.
The empty string is a valid value in the input values set.
Click to show internal directories.
Click to hide internal directories.