Documentation ¶
Index ¶
- Constants
- func EvalBool(expr string, args ...any) (bool, error)
- func EvalFloat(expr string, args ...any) (float64, error)
- func EvalInt(expr string, args ...any) (int, error)
- func EvalString(expr string, args ...any) (string, error)
- func SelectValue(value any, key string) any
- type Evaluable
- func (e *Evaluable) Eval(expr string, args ...any) (val Value, tokens []string, err error)
- func (e *Evaluable) EvalBool(expr string, args ...any) (bool, error)
- func (e *Evaluable) EvalFloat(expr string, args ...any) (float64, error)
- func (e *Evaluable) EvalInt(expr string, args ...any) (int, error)
- func (e *Evaluable) EvalString(expr string, args ...any) (string, error)
- type Func
- type Operator
- type Option
- type Value
- func (v Value) Add(v2 Value) Value
- func (v Value) And(v2 Value) Value
- func (v Value) Array() []any
- func (v Value) Boolean() bool
- func (v Value) Div(v2 Value) Value
- func (v Value) Eq(v2 Value) Value
- func (v Value) Float() float64
- func (v Value) Gt(v2 Value) Value
- func (v Value) Gte(v2 Value) Value
- func (v Value) In(v2 Value) Value
- func (v Value) Int() int
- func (v Value) Lt(v2 Value) Value
- func (v Value) Lte(v2 Value) Value
- func (v Value) Match(v2 Value) Value
- func (v Value) Mod(v2 Value) Value
- func (v Value) Multi(v2 Value) Value
- func (v Value) Nc(v2 Value) Value
- func (v Value) Neq(v2 Value) Value
- func (v Value) Not() Value
- func (v Value) Nre(v2 Value) Value
- func (v Value) Or(v2 Value) Value
- func (v Value) Re(v2 Value) Value
- func (v Value) String() string
- func (v Value) Sub(v2 Value) Value
- func (v Value) Ternary(v2 Value, v3 Value) Value
Constants ¶
View Source
const ( Nil = iota Boolean Number String Array Time Duration Json Struct Map Interface )
View Source
const AND = 57353
View Source
const EQ = 57347
View Source
const GTE = 57349
View Source
const IDENTIFIER = 57357
View Source
const IN = 57356
View Source
const LTE = 57350
View Source
const NC = 57355
View Source
const NEQ = 57348
View Source
const NRE = 57352
View Source
const OR = 57354
View Source
const RE = 57351
View Source
const VALUE = 57346
Variables ¶
This section is empty.
Functions ¶
func SelectValue ¶
Types ¶
type Evaluable ¶
type Evaluable struct {
// contains filtered or unexported fields
}
func NewEvaluable ¶
Click to show internal directories.
Click to hide internal directories.