Documentation ¶
Index ¶
- Constants
- func NewCookie() uint32
- func NotOfValue(value interface{}) (interface{}, error)
- func PatternToRegexp(pattern string) (*regexp.Regexp, error)
- func RandString(n int) string
- type BoolArrayEvaluator
- type BoolEvalFnc
- type BoolEvaluator
- func And(a *BoolEvaluator, b *BoolEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayBoolContains(a *BoolEvaluator, b *BoolArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayBoolEquals(a *BoolEvaluator, b *BoolArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayIntEquals(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayIntGreaterOrEqualThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayIntGreaterThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayIntLesserOrEqualThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayIntLesserThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayIntMatches(a *IntArrayEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayStringContains(a *StringEvaluator, b *StringArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func ArrayStringMatches(a *StringArrayEvaluator, b *StringArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func BoolEquals(a *BoolEvaluator, b *BoolEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func DurationGreaterOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func DurationGreaterThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func DurationLesserOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func DurationLesserThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func GreaterOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func GreaterThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func IntEquals(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func LesserOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func LesserThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func Not(a *BoolEvaluator, opts *Opts, state *state) *BoolEvaluator
- func Or(a *BoolEvaluator, b *BoolEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- func StringEquals(a *StringEvaluator, b *StringEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
- type Context
- type ContextPool
- type ErrAstToEval
- func NewError(pos lexer.Position, text string) *ErrAstToEval
- func NewOpError(pos lexer.Position, op string, err error) *ErrAstToEval
- func NewOpUnknownError(pos lexer.Position, op string) *ErrAstToEval
- func NewRegisterMultipleFields(pos lexer.Position, regID RegisterID, err error) *ErrAstToEval
- func NewRegisterNameNotAllowed(pos lexer.Position, regID RegisterID, err error) *ErrAstToEval
- func NewTypeError(pos lexer.Position, kind reflect.Kind) *ErrAstToEval
- type ErrFieldNotFound
- type ErrInvalidPattern
- type ErrInvalidRegexp
- type ErrIteratorNotSupported
- type ErrNonStaticPattern
- type ErrNotSupported
- type ErrRuleParse
- type ErrValueTypeMismatch
- type Evaluator
- type EvaluatorStringer
- type Event
- type EventType
- type Field
- type FieldValue
- type FieldValueType
- type IntArrayEvaluator
- type IntEvaluator
- func IntAnd(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*IntEvaluator, error)
- func IntNot(a *IntEvaluator, opts *Opts, state *state) *IntEvaluator
- func IntOr(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*IntEvaluator, error)
- func IntXor(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*IntEvaluator, error)
- func Minus(a *IntEvaluator, opts *Opts, state *state) *IntEvaluator
- type Iterator
- type Macro
- type MacroEvaluator
- type MacroID
- type Model
- type Opts
- type Register
- type RegisterID
- type Registers
- type Rule
- func (r *Rule) Eval(ctx *Context) bool
- func (r *Rule) GenEvaluator(model Model, opts *Opts) error
- func (r *Rule) GenPartials() error
- func (r *Rule) GetAst() *ast.Rule
- func (r *Rule) GetEvaluator() *RuleEvaluator
- func (r *Rule) GetEventTypes() []EventType
- func (r *Rule) GetFieldValues(field Field) []FieldValue
- func (r *Rule) GetFields() []Field
- func (r *Rule) GetPartialEval(field Field) BoolEvalFnc
- func (r *Rule) Parse() error
- func (r *Rule) PartialEval(ctx *Context, field Field) (bool, error)
- type RuleEvaluator
- type RuleID
- type StringArrayEvaluator
- type StringEvaluator
- type VariableValue
Constants ¶
const ( FunctionWeight = 5 InArrayWeight = 10 HandlerWeight = 50 RegexpWeight = 100 InPatternArrayWeight = 1000 IteratorWeight = 2000 )
defines factor applied by specific operator
Variables ¶
This section is empty.
Functions ¶
func NotOfValue ¶
func NotOfValue(value interface{}) (interface{}, error)
NotOfValue returns the NOT of a value
func PatternToRegexp ¶
PatternToRegexp converts pattern to regular expression
func RandString ¶
RandString returns a random string of the given length size
Types ¶
type BoolArrayEvaluator ¶
type BoolArrayEvaluator struct { EvalFnc func(ctx *Context) []bool Field Field Values []bool Weight int // contains filtered or unexported fields }
BoolArrayEvaluator returns an array of bool
func (*BoolArrayEvaluator) Eval ¶
func (b *BoolArrayEvaluator) Eval(ctx *Context) interface{}
Eval returns the result of the evaluation
func (*BoolArrayEvaluator) GetField ¶
func (b *BoolArrayEvaluator) GetField() string
GetField returns field name used by this evaluator
func (*BoolArrayEvaluator) IsPartial ¶
func (b *BoolArrayEvaluator) IsPartial() bool
IsPartial returns whether the evaluator is partial
func (*BoolArrayEvaluator) IsScalar ¶
func (b *BoolArrayEvaluator) IsScalar() bool
IsScalar returns whether the evaluator is a scalar
type BoolEvalFnc ¶
BoolEvalFnc describe a eval function return a boolean
type BoolEvaluator ¶
type BoolEvaluator struct { EvalFnc BoolEvalFnc Field Field Value bool Weight int // contains filtered or unexported fields }
BoolEvaluator returns a bool as result of the evaluation
func And ¶
func And(a *BoolEvaluator, b *BoolEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayBoolContains ¶
func ArrayBoolContains(a *BoolEvaluator, b *BoolArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
ArrayBoolContains evaluates array of bool against a value
func ArrayBoolEquals ¶
func ArrayBoolEquals(a *BoolEvaluator, b *BoolArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayIntEquals ¶
func ArrayIntEquals(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayIntGreaterOrEqualThan ¶
func ArrayIntGreaterOrEqualThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayIntGreaterThan ¶
func ArrayIntGreaterThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayIntLesserOrEqualThan ¶
func ArrayIntLesserOrEqualThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayIntLesserThan ¶
func ArrayIntLesserThan(a *IntEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func ArrayIntMatches ¶
func ArrayIntMatches(a *IntArrayEvaluator, b *IntArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
ArrayIntMatches weak comparison, a least one element of a should be in b
func ArrayStringContains ¶
func ArrayStringContains(a *StringEvaluator, b *StringArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
ArrayStringContains evaluates array of strings against a value
func ArrayStringMatches ¶
func ArrayStringMatches(a *StringArrayEvaluator, b *StringArrayEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
ArrayStringMatches weak comparison, a least one element of a should be in b. a can't contain regexp
func BoolEquals ¶
func BoolEquals(a *BoolEvaluator, b *BoolEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func DurationGreaterOrEqualThan ¶
func DurationGreaterOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func DurationGreaterThan ¶
func DurationGreaterThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func DurationLesserOrEqualThan ¶
func DurationLesserOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func DurationLesserThan ¶
func DurationLesserThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func GreaterOrEqualThan ¶
func GreaterOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func GreaterThan ¶
func GreaterThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func IntEquals ¶
func IntEquals(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func LesserOrEqualThan ¶
func LesserOrEqualThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func LesserThan ¶
func LesserThan(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func Or ¶
func Or(a *BoolEvaluator, b *BoolEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
func StringEquals ¶
func StringEquals(a *StringEvaluator, b *StringEvaluator, opts *Opts, state *state) (*BoolEvaluator, error)
StringEquals evaluates string
func (*BoolEvaluator) Eval ¶
func (b *BoolEvaluator) Eval(ctx *Context) interface{}
Eval returns the result of the evaluation
func (*BoolEvaluator) GetField ¶
func (b *BoolEvaluator) GetField() string
GetField returns field name used by this evaluator
func (*BoolEvaluator) IsPartial ¶
func (b *BoolEvaluator) IsPartial() bool
IsPartial returns whether the evaluator is partial
func (*BoolEvaluator) IsScalar ¶
func (b *BoolEvaluator) IsScalar() bool
IsScalar returns whether the evaluator is a scalar
type Context ¶
type Context struct { Object unsafe.Pointer Registers Registers // cache available across all the evaluations Cache map[string]unsafe.Pointer // contains filtered or unexported fields }
Context describes the context used during a rule evaluation
type ContextPool ¶
type ContextPool struct {
// contains filtered or unexported fields
}
ContextPool defines a pool of context
func (*ContextPool) Get ¶
func (c *ContextPool) Get(obj unsafe.Pointer) *Context
Get returns a context with the given object
func (*ContextPool) Put ¶
func (c *ContextPool) Put(ctx *Context)
Put returns the context to the pool
type ErrAstToEval ¶
ErrAstToEval describes an error that occurred during the conversion from the AST to an evaluator
func NewError ¶
func NewError(pos lexer.Position, text string) *ErrAstToEval
NewError returns a new ErrAstToEval error
func NewOpError ¶
func NewOpError(pos lexer.Position, op string, err error) *ErrAstToEval
NewOpError returns a new ErrAstToEval error when an operator was used in an invalid manner
func NewOpUnknownError ¶
func NewOpUnknownError(pos lexer.Position, op string) *ErrAstToEval
NewOpUnknownError returns a new ErrAstToEval error when an unknown operator was used
func NewRegisterMultipleFields ¶
func NewRegisterMultipleFields(pos lexer.Position, regID RegisterID, err error) *ErrAstToEval
NewRegisterMultipleFields returns a new ErrAstToEval error when a register is used across multiple fields
func NewRegisterNameNotAllowed ¶
func NewRegisterNameNotAllowed(pos lexer.Position, regID RegisterID, err error) *ErrAstToEval
NewRegisterNameNotAllowed returns a new ErrAstToEval error when a register name is not allowed
func NewTypeError ¶
func NewTypeError(pos lexer.Position, kind reflect.Kind) *ErrAstToEval
NewTypeError returns a new ErrAstToEval error when an invalid type was used
func (*ErrAstToEval) Error ¶
func (r *ErrAstToEval) Error() string
type ErrFieldNotFound ¶
type ErrFieldNotFound struct {
Field string
}
ErrFieldNotFound error when a field is not present in the model
func (ErrFieldNotFound) Error ¶
func (e ErrFieldNotFound) Error() string
type ErrInvalidPattern ¶
type ErrInvalidPattern struct {
Pattern string
}
ErrInvalidPattern is returned for an invalid regular expression
func (ErrInvalidPattern) Error ¶
func (e ErrInvalidPattern) Error() string
type ErrInvalidRegexp ¶
type ErrInvalidRegexp struct {
Regexp string
}
ErrInvalidRegexp is returned for an invalid regular expression
func (ErrInvalidRegexp) Error ¶
func (e ErrInvalidRegexp) Error() string
type ErrIteratorNotSupported ¶
type ErrIteratorNotSupported struct {
Field string
}
ErrIteratorNotSupported error when a field doesn't support iteration
func (ErrIteratorNotSupported) Error ¶
func (e ErrIteratorNotSupported) Error() string
type ErrNonStaticPattern ¶
type ErrNonStaticPattern struct {
Field Field
}
ErrNonStaticPattern when pattern operator is used on a non static value
func (ErrNonStaticPattern) Error ¶
func (e ErrNonStaticPattern) Error() string
type ErrNotSupported ¶
type ErrNotSupported struct {
Field string
}
ErrNotSupported returned when something is not supported on a field
func (ErrNotSupported) Error ¶
func (e ErrNotSupported) Error() string
type ErrRuleParse ¶
type ErrRuleParse struct {
// contains filtered or unexported fields
}
ErrRuleParse describes a parsing error and its position in the expression
func (*ErrRuleParse) Error ¶
func (e *ErrRuleParse) Error() string
type ErrValueTypeMismatch ¶
type ErrValueTypeMismatch struct {
Field string
}
ErrValueTypeMismatch error when the given value is not having the correct type
func (ErrValueTypeMismatch) Error ¶
func (e ErrValueTypeMismatch) Error() string
type Evaluator ¶
type Evaluator interface { Eval(ctx *Context) interface{} IsPartial() bool GetField() string IsScalar() bool }
Evaluator is the interface of an evaluator
type EvaluatorStringer ¶
EvaluatorStringer implements the stringer in order to show the result of an evaluation. Should probably used only for logging
type Event ¶
type Event interface { // GetType returns the Type of the Event GetType() EventType // GetFieldEventType returns the Event Type for the given Field GetFieldEventType(field Field) (EventType, error) // SetFieldValue sets the value of the given Field SetFieldValue(field Field, value interface{}) error // GetFieldValue returns the value of the given Field GetFieldValue(field Field) (interface{}, error) // GetFieldType returns the Type of the Field GetFieldType(field Field) (reflect.Kind, error) // GetPointer returns an unsafe.Pointer of this object GetPointer() unsafe.Pointer // GetTags returns a list of tags GetTags() []string }
Event is an interface that an Event has to implement for the evaluation
type FieldValue ¶
type FieldValue struct { Value interface{} Type FieldValueType Regexp *regexp.Regexp }
FieldValue describes a field value with its type
type FieldValueType ¶
type FieldValueType int
FieldValueType represents the type of the value of a field
const ( ScalarValueType FieldValueType = 1 << 0 PatternValueType FieldValueType = 1 << 1 RegexpValueType FieldValueType = 1 << 2 BitmaskValueType FieldValueType = 1 << 3 VariableValueType FieldValueType = 1 << 4 )
Field value types
type IntArrayEvaluator ¶
type IntArrayEvaluator struct { EvalFnc func(ctx *Context) []int Field Field Values []int Weight int // contains filtered or unexported fields }
IntArrayEvaluator returns an array of int
func (*IntArrayEvaluator) Eval ¶
func (i *IntArrayEvaluator) Eval(ctx *Context) interface{}
Eval returns the result of the evaluation
func (*IntArrayEvaluator) GetField ¶
func (i *IntArrayEvaluator) GetField() string
GetField returns field name used by this evaluator
func (*IntArrayEvaluator) IsPartial ¶
func (i *IntArrayEvaluator) IsPartial() bool
IsPartial returns whether the evaluator is partial
func (*IntArrayEvaluator) IsScalar ¶
func (i *IntArrayEvaluator) IsScalar() bool
IsScalar returns whether the evaluator is a scalar
type IntEvaluator ¶
type IntEvaluator struct { EvalFnc func(ctx *Context) int Field Field Value int Weight int // contains filtered or unexported fields }
IntEvaluator returns an int as result of the evaluation
func IntAnd ¶
func IntAnd(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*IntEvaluator, error)
func IntNot ¶
func IntNot(a *IntEvaluator, opts *Opts, state *state) *IntEvaluator
IntNot - ^int operator
func IntOr ¶
func IntOr(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*IntEvaluator, error)
func IntXor ¶
func IntXor(a *IntEvaluator, b *IntEvaluator, opts *Opts, state *state) (*IntEvaluator, error)
func Minus ¶
func Minus(a *IntEvaluator, opts *Opts, state *state) *IntEvaluator
Minus - -int operator
func (*IntEvaluator) Eval ¶
func (i *IntEvaluator) Eval(ctx *Context) interface{}
Eval returns the result of the evaluation
func (*IntEvaluator) GetField ¶
func (i *IntEvaluator) GetField() string
GetField returns field name used by this evaluator
func (*IntEvaluator) IsPartial ¶
func (i *IntEvaluator) IsPartial() bool
IsPartial returns whether the evaluator is partial
func (*IntEvaluator) IsScalar ¶
func (i *IntEvaluator) IsScalar() bool
IsScalar returns whether the evaluator is a scalar
type Macro ¶
type Macro struct { ID MacroID Expression string Opts *Opts // contains filtered or unexported fields }
Macro - Macro object identified by an `ID` containing a SECL `Expression`
func (*Macro) GenEvaluator ¶
GenEvaluator - Compiles and generates the evalutor
func (*Macro) GetEvaluator ¶
func (m *Macro) GetEvaluator() *MacroEvaluator
GetEvaluator - Returns the MacroEvaluator of the Macro corresponding to the SECL `Expression`
func (*Macro) GetEventTypes ¶
GetEventTypes - Returns a list of all the Event Type that the `Expression` handles
type MacroEvaluator ¶
type MacroEvaluator struct { Value interface{} EventTypes []EventType FieldValues map[Field][]FieldValue }
MacroEvaluator - Evaluation part of a Macro
func (*MacroEvaluator) GetFields ¶
func (m *MacroEvaluator) GetFields() []Field
GetFields - Returns all the Field that the MacroEvaluator handles
type Model ¶
type Model interface { // GetEvaluator returns an evaluator for the given field GetEvaluator(field Field, regID RegisterID) (Evaluator, error) // ValidateField returns whether the value use against the field is valid, ex: for constant ValidateField(field Field, value FieldValue) error // GetIterator return an iterator GetIterator(field Field) (Iterator, error) // NewEvent returns a new event instance NewEvent() Event }
Model - interface that a model has to implement for the rule compilation
type Opts ¶
type Opts struct { LegacyAttributes map[Field]Field Constants map[string]interface{} Macros map[MacroID]*Macro Variables map[string]VariableValue }
Opts are the options to be passed to the evaluator
type Rule ¶
type Rule struct { ID RuleID Expression string Tags []string Opts *Opts Model Model // contains filtered or unexported fields }
Rule - Rule object identified by an `ID` containing a SECL `Expression`
func (*Rule) GenEvaluator ¶
GenEvaluator - Compile and generates the RuleEvaluator
func (*Rule) GenPartials ¶
GenPartials - Compiles and generates partial Evaluators
func (*Rule) GetEvaluator ¶
func (r *Rule) GetEvaluator() *RuleEvaluator
GetEvaluator - Returns the RuleEvaluator of the Rule corresponding to the SECL `Expression`
func (*Rule) GetEventTypes ¶
GetEventTypes - Returns a list of all the event that the `Expression` handles
func (*Rule) GetFieldValues ¶
func (r *Rule) GetFieldValues(field Field) []FieldValue
GetFieldValues returns the values of the given field
func (*Rule) GetFields ¶
GetFields - Returns all the Field of the Rule including field of the Macro used
func (*Rule) GetPartialEval ¶
func (r *Rule) GetPartialEval(field Field) BoolEvalFnc
GetPartialEval - Returns the Partial RuleEvaluator for the given Field
type RuleEvaluator ¶
type RuleEvaluator struct { Eval BoolEvalFnc EventTypes []EventType FieldValues map[Field][]FieldValue // contains filtered or unexported fields }
RuleEvaluator - Evaluation part of a Rule
func (*RuleEvaluator) GetFields ¶
func (r *RuleEvaluator) GetFields() []Field
GetFields - Returns all the Field that the RuleEvaluator handles
func (*RuleEvaluator) PartialEval ¶
func (r *RuleEvaluator) PartialEval(ctx *Context, field Field) (bool, error)
PartialEval partially evaluation of the Rule with the given Field.
type StringArrayEvaluator ¶
type StringArrayEvaluator struct { EvalFnc func(ctx *Context) []string Field Field Values []string Weight int // contains filtered or unexported fields }
StringArrayEvaluator returns an array of strings
func (*StringArrayEvaluator) Eval ¶
func (s *StringArrayEvaluator) Eval(ctx *Context) interface{}
Eval returns the result of the evaluation
func (*StringArrayEvaluator) GetField ¶
func (s *StringArrayEvaluator) GetField() string
GetField returns field name used by this evaluator
func (*StringArrayEvaluator) IsPartial ¶
func (s *StringArrayEvaluator) IsPartial() bool
IsPartial returns whether the evaluator is partial
func (*StringArrayEvaluator) IsScalar ¶
func (s *StringArrayEvaluator) IsScalar() bool
IsScalar returns whether the evaluator is a scalar
type StringEvaluator ¶
type StringEvaluator struct { EvalFnc func(ctx *Context) string Field Field Value string Weight int // contains filtered or unexported fields }
StringEvaluator returns a string as result of the evaluation
func (*StringEvaluator) Eval ¶
func (s *StringEvaluator) Eval(ctx *Context) interface{}
Eval returns the result of the evaluation
func (*StringEvaluator) GetField ¶
func (s *StringEvaluator) GetField() string
GetField returns field name used by this evaluator
func (*StringEvaluator) IsPartial ¶
func (s *StringEvaluator) IsPartial() bool
IsPartial returns whether the evaluator is partial
func (*StringEvaluator) IsScalar ¶
func (s *StringEvaluator) IsScalar() bool
IsScalar returns whether the evaluator is a scalar