expression

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 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

func ParseTemplate added in v0.22.0

func ParseTemplate(text string) (ast.Expr, error)

Types

type EvalError added in v0.22.0

type EvalError = internal.EvalError

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(text string, 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

type ParseError added in v0.22.0

type ParseError = internal.ParseError

Jump to

Keyboard shortcuts

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