Documentation
¶
Index ¶
- func DigObject(object any, key string) (any, error)
- func Evaluate(obj any, s string) (*structpb.Value, error)
- func Expand(obj *InterpolationContext, value *structpb.Value) (*structpb.Value, error)
- func ExpandString(obj *InterpolationContext, value string) (string, error)
- func FormatEvalErr(err error, value string) error
- func FormatParseErr(err error, value string) error
- func MoaValueToStructPbValue(val value.Value) (*structpb.Value, error)
- func NewEnv() *stdlib.Env
- func ObjectToProtoValue(object any) (*structpb.Value, error)
- func StructPbValueToMoaValue(val *structpb.Value) value.Value
- func ValueToString(v *structpb.Value) (string, error)
- type EvalError
- type InterpolationContext
- type ParseError
- type StepResultView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 FormatParseErr ¶ added in v0.22.0
func MoaValueToStructPbValue ¶ added in v0.18.0
func NewEnv ¶ added in v0.20.0
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
Types ¶
type EvalError ¶ added in v0.22.0
type EvalError struct {
// contains filtered or unexported fields
}
type InterpolationContext ¶
type InterpolationContext struct {
Env map[string]string `json:"env"`
ExportFile string `json:"export_file"`
Inputs map[string]*structpb.Value `json:"inputs"`
Job map[string]*structpb.Value `json:"job"`
OutputFile string `json:"output_file"`
StepDir string `json:"step_dir"`
StepResults map[string]*StepResultView `json:"steps"`
WorkDir string `json:"work_dir"`
}
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 ¶
Click to show internal directories.
Click to hide internal directories.