Documentation
¶
Index ¶
- Variables
- func ContainsExpression(input string) bool
- func ExtractExpressions(input string) []string
- func ReplaceExpressions(input string, replacer func(expr string) (string, error)) (string, error)
- type Context
- type ContextFunction
- type Expression
- type Function
- type StepContext
- type Token
- type TokenType
Constants ¶
This section is empty.
Variables ¶
View Source
var ExpressionPattern = regexp.MustCompile(`\$\{\{\s*(.*?)\s*\}\}`)
ExpressionPattern matches ${{ ... }} expressions
Functions ¶
func ContainsExpression ¶
ContainsExpression checks if a string contains any expressions
func ExtractExpressions ¶
ExtractExpressions returns all expression strings from input
Types ¶
type Context ¶
type Context struct {
Event map[string]interface{}
Env map[string]string
Steps map[string]StepContext
Functions map[string]Function
ContextFunctions map[string]ContextFunction
}
Context holds the evaluation context for expressions
func (*Context) EvaluateBool ¶
EvaluateBool evaluates an expression and returns a boolean result
type ContextFunction ¶
ContextFunction represents a built-in function that needs context access
type Expression ¶
Expression represents a parsed expression
func Parse ¶
func Parse(input string) ([]Expression, error)
Parse extracts and parses expressions from a string Returns the original string with expression placeholders and a map of expressions
type Function ¶
type Function func(args ...interface{}) (interface{}, error)
Function represents a built-in function
type StepContext ¶
type StepContext struct {
Outputs map[string]string
Outcome string // success, failure, cancelled, skipped
}
StepContext holds the output of a previous step
Click to show internal directories.
Click to hide internal directories.