Documentation
¶
Index ¶
- func CompileExpressionWithEnv(expression string, env *cel.Env) (cel.Program, error)
- func Evaluate(expression string, obj client.Object) (any, error)
- func EvaluateExpression(yamlStr string, templateData map[string]any) ([]byte, error)
- func EvaluateList(expression string, objs []client.Object) ([]any, error)
- func EvaluateTyped[T any](expression string, obj client.Object) (T, error)
- func EvaluateWithData(expression string, env *cel.Env, data map[string]any) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileExpressionWithEnv ¶
CompileExpressionWithEnv compiles a CEL expression using the provided environment. This is a shared helper that can be reused across different CEL evaluation contexts.
func Evaluate ¶
Evaluate evaluates a CEL expression against a single Kubernetes object. Returns the result of the evaluation.
func EvaluateExpression ¶
EvaluateExpression takes a YAML string with ${...} placeholders and evaluates them as CEL expressions.
func EvaluateList ¶
EvaluateList evaluates a CEL expression against multiple Kubernetes objects. Returns a slice of results, one for each input object.
func EvaluateTyped ¶
EvaluateTyped evaluates a CEL expression against a single Kubernetes object. The result is unmarshalled into the specified generic type T. Returns the result of the evaluation or an error.
Types ¶
This section is empty.