Versions in this module Expand all Collapse all v1 v1.0.0 Feb 20, 2024 Changes in this version + var SyntaxErrorInvalidCondition = errors.New("kv condition invalid condition") + var SyntaxErrorMissingRightBracket = errors.New("kv condition missing right bracket") + var UnknownOperator = errors.New("unknown operator") + type Condition struct + Left Node + Operator ConditionOperator + Right Node + func And(left Node, right Node) *Condition + func Or(left Node, right Node) *Condition + func (c *Condition) String() string + type ConditionOperator int + const ConditionOperatorAND + const ConditionOperatorOR + type KVCondition struct + func ParseKVCondition(r []byte) (*KVCondition, error) + func (v *KVCondition) Range(cb func(condition *Rule)) + func (v *KVCondition) UnmarshalText(data []byte) error + func (v KVCondition) IsZero() bool + func (v KVCondition) MarshalText() ([]byte, error) + type Node interface + String func() string + type Operator int + const OperatorContains + const OperatorEndsWith + const OperatorEqual + const OperatorExists + const OperatorNotEqual + const OperatorStartsWith + func ParseOperator(op string) (Operator, error) + func (op Operator) Of(key string, value string) *Rule + func (op Operator) String() string + type Rule struct + Key []byte + Operator Operator + Value []byte + func (l *Rule) String() string