Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnpopulatedBasicExpression ... ErrUnpopulatedBasicExpression = errors.New("filter: unpopulated BasicExpression") // ErrUnpopulatedTerm ... ErrUnpopulatedTerm = errors.New("filter: unpopulated Term") )
View Source
var Parser = participle.MustBuild( &Condition{}, defaultParserOptions..., )
Parser will be used to parse Filter Expression into defined Go Structs.
Functions ¶
This section is empty.
Types ¶
type AsFilter ¶
AsFilter interface that will be implemented by filter structs with logic of stringifying them to filter expression
type Condition ¶
type Condition struct { Term *term `parser:"@@" json:"term,omitempty"` And []*term `parser:"( (\"AND\" @@ )+" json:"and,omitempty"` Or []*term `parser:"| (\"OR\" @@)+ )?" json:"or,omitempty"` }
Condition contains term or multiple terms with 'AND' or 'OR' logical operator
Click to show internal directories.
Click to hide internal directories.