expression

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(obj *InterpolationContext, value *structpb.Value) (*structpb.Value, error)

func ExpandString

func ExpandString(obj *InterpolationContext, value string) (string, error)

The ExpandString rewrites string and returns string

func FormatEvalErr added in v0.22.0

func FormatEvalErr(err error, value string) error

func FormatParseErr added in v0.22.0

func FormatParseErr(err error, value string) error

func MoaValueToStructPbValue added in v0.18.0

func MoaValueToStructPbValue(val value.Value) (*structpb.Value, error)

func NewEnv added in v0.20.0

func NewEnv() *stdlib.Env

NewEnv creates a new moa environment.

The environment contains the standard library function with an empty context. Use AddContext to add values to the context. This environment is shared between the step-runner and the runner (for job inputs interpolation).

func StructPbValueToMoaValue added in v0.18.0

func StructPbValueToMoaValue(val *structpb.Value) value.Value

Types

type EvalError added in v0.22.0

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

func (*EvalError) Error added in v0.22.0

func (e *EvalError) Error() string

func (*EvalError) Unwrap added in v0.22.0

func (e *EvalError) Unwrap() error

type InterpolationContext

type InterpolationContext struct {
	Env         map[string]string
	ExportFile  string
	Inputs      map[string]*structpb.Value
	Vars        map[string]*structpb.Value
	OutputFile  string
	FuncDir     string
	StepResults map[string]*StepResultView
	WorkDir     string
}

InterpolationContext contains fields that can be accessed by expressions.

func (*InterpolationContext) ToStructPbValue added in v0.18.0

func (ic *InterpolationContext) ToStructPbValue() *structpb.Value

type ParseError added in v0.22.0

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

func (*ParseError) Error added in v0.22.0

func (e *ParseError) Error() string

func (*ParseError) Unwrap added in v0.22.0

func (e *ParseError) Unwrap() error

type StepResultView

type StepResultView struct {
	Outputs map[string]*structpb.Value `json:"outputs"`
}

Jump to

Keyboard shortcuts

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