Documentation ¶
Index ¶
- Constants
- func ConvertToSameType(left interface{}, right interface{}) (interface{}, interface{}, error)
- type Expr
- type Expression
- func (f *Expression) Eval() (interface{}, error)
- func (f *Expression) EvalWithData(data interface{}, inputScope data.Scope, resolver data.Resolver) (interface{}, error)
- func (f *Expression) EvalWithScope(inputScope data.Scope, resolver data.Resolver) (interface{}, error)
- func (e *Expression) IsNil() bool
- func (e *Expression) String() string
- type LiteralExpr
- type TernaryExpression
- func (t *TernaryExpression) Eval() (interface{}, error)
- func (t *TernaryExpression) EvalWithData(value interface{}, inputScope data.Scope, resolver data.Resolver) (interface{}, error)
- func (t *TernaryExpression) EvalWithScope(inputScope data.Scope, resolver data.Resolver) (interface{}, error)
- func (t *TernaryExpression) HandleParameter(param interface{}, value interface{}, inputScope data.Scope, ...) (interface{}, error)
Constants ¶
View Source
const ( OR = "||" AND = "&&" EQ = "==" NOT_EQ = "!=" GT = ">" LT = "<" GTE = ">=" LTE = "<=" ADDITION = "+" SUBTRACTION = "-" MULTIPLICATION = "*" DIVIDE = "/" MODE = "%" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToSameType ¶ added in v0.5.5
func ConvertToSameType(left interface{}, right interface{}) (interface{}, interface{}, error)
Types ¶
type Expression ¶
type Expression struct { Left Expr `json:"left"` Operator string `json:"operator"` Right Expr `json:"right"` Value Expr `json:"value"` }
func NewExpression ¶
func NewExpression() *Expression
func (*Expression) Eval ¶
func (f *Expression) Eval() (interface{}, error)
func (*Expression) EvalWithData ¶
func (*Expression) EvalWithScope ¶
func (*Expression) IsNil ¶
func (e *Expression) IsNil() bool
func (*Expression) String ¶
func (e *Expression) String() string
type LiteralExpr ¶ added in v0.5.8
type LiteralExpr struct {
V interface{}
}
func NewLiteralExpr ¶ added in v0.5.8
func NewLiteralExpr(v interface{}) *LiteralExpr
func (*LiteralExpr) Eval ¶ added in v0.5.8
func (iffl *LiteralExpr) Eval() (interface{}, error)
func (*LiteralExpr) EvalWithData ¶ added in v0.5.8
func (*LiteralExpr) EvalWithScope ¶ added in v0.5.8
type TernaryExpression ¶ added in v0.5.8
func (*TernaryExpression) Eval ¶ added in v0.5.8
func (t *TernaryExpression) Eval() (interface{}, error)
func (*TernaryExpression) EvalWithData ¶ added in v0.5.8
func (*TernaryExpression) EvalWithScope ¶ added in v0.5.8
func (*TernaryExpression) HandleParameter ¶ added in v0.5.8
Click to show internal directories.
Click to hide internal directories.