expression

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Sensitive can be used as a sensitive marker on values
	Sensitive = 1 << iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator added in v0.20.0

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

func NewEvaluator added in v0.20.0

func NewEvaluator(inputsMap value.Value) (*Evaluator, error)

NewEvaluator creates a new Evaluator for input evaluations.

Use the Eval method to evaluate the provided inputs in some text. Sensitive inputs can be marked with the Sensitive mark defined in this package.

func (*Evaluator) Eval added in v0.20.0

func (e *Evaluator) Eval(expr ast.Expr) (value.Value, error)

Eval evaluates the Evaluator inputs in the given expression.

The evaluated expression is returned as a moa value.Value. Marks, like Sensitive are inferred into that value.

type Input added in v0.20.0

type Input struct {
	Key   string
	Value value.Value
}

func (Input) MarkSensitive added in v0.20.0

func (i Input) MarkSensitive() Input

func (Input) Sensitive added in v0.20.0

func (i Input) Sensitive() bool

Jump to

Keyboard shortcuts

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