evaluator

package
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package evaluator is responsible for evaluating (interpolating) dynamic expressions found in workflow definitions at run-time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(expr string, from map[string]interface{}) interface{}

Evaluate evaluates a mathematical or logical expression For example: "i + 1" or "bar.goo / foo.z" or "foo.z * (1 + bar.zoo)"

Types

type ExpressionEvaluator

type ExpressionEvaluator struct{}

ExpressionEvaluator evaluates string expressions with variables

func New

func New() *ExpressionEvaluator

New creates a new expression evaluator

func (*ExpressionEvaluator) Evaluate

func (e *ExpressionEvaluator) Evaluate(expr string, variables map[string]interface{}) interface{}

Evaluate evaluates an expression string with variables from the context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL