Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryCondition ¶
type BinaryCondition struct { Left Expression Operator string Right Expression }
func (*BinaryCondition) EvalCondition ¶
func (e *BinaryCondition) EvalCondition(ctx context.Context, o interface{}) (bool, error)
func (*BinaryCondition) String ¶
func (e *BinaryCondition) String() string
type Condition ¶
type Condition interface { fmt.Stringer EvalCondition(ctx context.Context, m interface{}) (bool, error) }
func ParseCondition ¶
type Expression ¶
type Expression interface { fmt.Stringer Eval(ctx context.Context, m interface{}) (interface{}, bool, error) }
func ParseExpression ¶
func ParseExpression(s string) (Expression, error)
type IdentifierExpression ¶
type IdentifierExpression struct {
Key string
}
func (*IdentifierExpression) Eval ¶
func (e *IdentifierExpression) Eval(ctx context.Context, o interface{}) (interface{}, bool, error)
func (*IdentifierExpression) String ¶
func (e *IdentifierExpression) String() string
type IndexExpression ¶
type IndexExpression struct { Base Expression Key string Style string }
func (*IndexExpression) Eval ¶
func (e *IndexExpression) Eval(ctx context.Context, o interface{}) (interface{}, bool, error)
func (*IndexExpression) String ¶
func (e *IndexExpression) String() string
type LiteralExpression ¶
type LiteralExpression struct {
Value string
}
func (*LiteralExpression) Eval ¶
func (e *LiteralExpression) Eval(ctx context.Context, o interface{}) (interface{}, bool, error)
func (*LiteralExpression) String ¶
func (e *LiteralExpression) String() string
type NegateCondition ¶
type NegateCondition struct {
Inner Condition
}
func (*NegateCondition) EvalCondition ¶
func (e *NegateCondition) EvalCondition(ctx context.Context, o interface{}) (bool, error)
func (*NegateCondition) String ¶
func (e *NegateCondition) String() string
type Parser ¶
type Parser struct {
lexparse.BaseParser
}
func (*Parser) ParseCondition ¶
func (*Parser) ParseExpression ¶
func (p *Parser) ParseExpression() (Expression, error)
type TruthyCondition ¶
type TruthyCondition struct {
Expr Expression
}
func (*TruthyCondition) EvalCondition ¶
func (e *TruthyCondition) EvalCondition(ctx context.Context, o interface{}) (bool, error)
func (*TruthyCondition) String ¶
func (e *TruthyCondition) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.