expr

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(ex string, env *ExpressionData) (interface{}, error)

func EvaluateString

func EvaluateString(ex string, env *ExpressionData) (string, error)

func IsTruthy

func IsTruthy(ex string, env *ExpressionData) (bool, error)

Types

type CtxData

type CtxData struct {
	Workspace     string `expr:"workspace"`
	Namespace     string `expr:"namespace"`
	WorkspacePath string `expr:"workspacePath"`
	FlowFilePath  string `expr:"flowFilePath"`
	FlowFileDir   string `expr:"flowFileDir"`
}

type ExpressionData

type ExpressionData struct {
	OS    string            `expr:"os"`
	Arch  string            `expr:"arch"`
	Ctx   *CtxData          `expr:"ctx"`
	Store map[string]string `expr:"store"`
	Env   map[string]string `expr:"env"`
}

func ExpressionEnv

func ExpressionEnv(
	ctx *context.Context,
	executable *executable.Executable,
	dataMap, envMap map[string]string,
) ExpressionData

Jump to

Keyboard shortcuts

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