Documentation ¶
Index ¶
Constants ¶
View Source
const ( GroupLogicAnd = iota GroupLogicOr GroupLogicXor )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface { // Not makes a resulting Condition negative. // May be set for any resulting Condition type. Not() Builder // All defines the nested Condition set for a resulting GroupCondition with GroupLogicAnd. All(children []Condition) Builder // Any defines the nested Condition set for a resulting GroupCondition with GroupLogicOr. Any(children []Condition) Builder // Xor defines the nested Condition set for a resulting GroupCondition with GroupLogicXor. Xor(children []Condition) Builder // BuildGroupCondition builds a GroupCondition. BuildGroupCondition() (c Condition) // AttributeKey defines the incoming messages attribute key to match for a resulting KeyCondition. // Default is empty string key. For a TextCondition empty key causes the matching against all attribute keys. AttributeKey(k string) Builder // AnyOfWords defines the text search words (separated by a whitespace) for a resulting TextCondition. AnyOfWords(text string) Builder // TextEquals enables the exact text matching criteria for a resulting TextCondition. TextEquals(text string) Builder // BuildTextCondition builds a TextCondition. BuildTextCondition() (c Condition) // GreaterThan enables the number value matching criteria "x > val" for a NumberCondition. GreaterThan(val float64) Builder // GreaterThanOrEqual enables the number value matching criteria "x >= val" for a NumberCondition. GreaterThanOrEqual(val float64) Builder // Equal enables the number value matching criteria "x == val" for a NumberCondition. Equal(val float64) Builder // LessThanOrEqual enables the number value matching criteria "x <= val" for a NumberCondition. LessThanOrEqual(val float64) Builder // LessThan enables the number value matching criteria "x < val" for a NumberCondition. LessThan(val float64) Builder // BuildNumberCondition builds a NumberCondition BuildNumberCondition() (c Condition) }
func NewBuilder ¶
func NewBuilder() Builder
type GroupCondition ¶
type GroupCondition interface { Condition GetLogic() (logic GroupLogic) GetGroup() (group []Condition) }
func NewGroupCondition ¶
func NewGroupCondition(c Condition, logic GroupLogic, group []Condition) GroupCondition
type GroupLogic ¶
type GroupLogic int
func (GroupLogic) String ¶
func (gl GroupLogic) String() string
type KeyCondition ¶
func NewKeyCondition ¶
func NewKeyCondition(c Condition, k string) KeyCondition
type NumberCondition ¶ added in v1.0.4
type NumberCondition interface { KeyCondition GetOperation() NumOp GetValue() float64 }
func NewNumberCondition ¶ added in v1.0.4
func NewNumberCondition(kc KeyCondition, op NumOp, val float64) NumberCondition
type TextCondition ¶ added in v0.0.5
type TextCondition interface { KeyCondition GetTerm() string IsExact() bool }
func NewTextCondition ¶ added in v0.0.5
func NewTextCondition(kc KeyCondition, pattern string, exact bool) TextCondition
Click to show internal directories.
Click to hide internal directories.