Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComparisonOperation ¶
type ComparisonOperation string
const ( Equals ComparisonOperation = "=" NotEquals ComparisonOperation = "!=" LessThan ComparisonOperation = "<" LessEquals ComparisonOperation = "<=" GreaterEquals ComparisonOperation = ">=" GreaterThan ComparisonOperation = ">" )
type Filterer ¶
type Filterer interface { And(other Filterer) *LogicalExpressions String() string }
Filterer interface for both Term and LogicalExpressions.
type LogicalExpression ¶
type LogicalExpression struct { Op LogicalOperation Filter Filterer }
LogicalExpression represents a pair of filter terms joined with a logical operator.
type LogicalExpressions ¶
type LogicalExpressions struct {
// contains filtered or unexported fields
}
LogicalExpressions represents a list of logical expressions.
func (*LogicalExpressions) And ¶
func (le *LogicalExpressions) And(other Filterer) *LogicalExpressions
func (*LogicalExpressions) String ¶
func (le *LogicalExpressions) String() string
type Term ¶
type Term struct {
// contains filtered or unexported fields
}
Term helps represent a single filter condition, e.g. "field = value".
func NewTerm ¶
func NewTerm(field string, op ComparisonOperation, value interface{}) *Term
func (*Term) And ¶
func (t *Term) And(other Filterer) *LogicalExpressions
Click to show internal directories.
Click to hide internal directories.