expressions

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KangarooBinder

type KangarooBinder struct {
	// contains filtered or unexported fields
}

KangarooBinder implements expression binding using local Kangaroo runtime

func NewKangarooBinder

func NewKangarooBinder(opts KangarooBinderOptions) (*KangarooBinder, error)

NewKangarooBinder creates a new local Kangaroo expression binder

func (*KangarooBinder) BindString

func (b *KangarooBinder) BindString(ctx context.Context, item any, str string) (any, error)

BindString processes a string that may contain expressions and returns the result

func (*KangarooBinder) BindToStruct

func (b *KangarooBinder) BindToStruct(ctx context.Context, item any, target any, userNodeSettings map[string]any) error

BindToStruct binds Kangaroo expressions in userNodeSettings to the target struct using item data

func (*KangarooBinder) BindToStructWithJSON

func (b *KangarooBinder) BindToStructWithJSON(ctx context.Context, item any, target any, userNodeSettings map[string]any) error

BindToStructWithJSON binds expressions in userNodeSettings to the target struct using item data This method implements the IntegrationParameterBinder interface

func (*KangarooBinder) BindValue

func (b *KangarooBinder) BindValue(ctx context.Context, item any, value any) (any, error)

func (*KangarooBinder) Close

func (b *KangarooBinder) Close() error

Close performs cleanup operations

func (*KangarooBinder) Evaluate

func (b *KangarooBinder) Evaluate(expression string, context *types.ExpressionContext) (*types.EvaluationResult, error)

Evaluate evaluates a single expression directly

type KangarooBinderOptions

type KangarooBinderOptions struct {
	Logger          zerolog.Logger
	DefaultTimeout  time.Duration
	KangarooOptions *types.EvaluatorOptions
}

KangarooBinderOptions configures the local Kangaroo binder

func DefaultKangarooBinderOptions

func DefaultKangarooBinderOptions() KangarooBinderOptions

DefaultLocalKangarooBinderOptions returns sensible defaults

Jump to

Keyboard shortcuts

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