Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalBool ¶
func EvalBool(expr workflow.Expression, resolve VarResolver) (bool, error)
EvalBool evaluates and returns a bool.
func EvalString ¶
func EvalString(expr workflow.Expression, resolve VarResolver) (string, error)
EvalString is a convenience that evaluates and returns a string.
Types ¶
type Value ¶
Value is the runtime representation of a typed workflow variable.
The workflow has its own type system (int / float / bool / string) that Go's compiler knows nothing about. Value bridges the two: Type carries the declared workflow type, Raw holds the actual storage. Type mismatches are caught at runtime by Cast / AsX, not at compile time.
This is the standard interpreter pattern — the hosted language's type system lives in the interpreter's data structures rather than in the host language's compiler.
func Coerce ¶
Coerce converts any into a typed Value of the declared data type. Nil is treated as absence and returns the zero value without error; any other concrete type that doesn't match dt returns a non-nil error.
func Eval ¶
func Eval(expr workflow.Expression, resolve VarResolver) (Value, error)
Eval evaluates an workflow.Expression against resolved references, returning a typed Value.