Documentation ¶
Index ¶
- func Coalesce() cel.EnvOption
- func Compile(source string) (cel.Program, error)
- func Eval[ReturnType any](ctx context.Context, prg cel.Program, scope map[string]any) (result ReturnType, err error)
- func First() cel.EnvOption
- func Pluck() cel.EnvOption
- func Replace() cel.EnvOption
- func Stdlib() cel.EnvOption
- func TrimPrefix() cel.EnvOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
Compile takes a CEL expression and compiles it with the standard environment. We don't have anything in the standard environment just yet, but this ensures we instantiate the CEL VM consistently, wherever we might use it.
func Eval ¶
func Eval[ReturnType any](ctx context.Context, prg cel.Program, scope map[string]any) (result ReturnType, err error)
Eval evaluates the given program against the scope, returning a value that matches the type requested via the generic ReturnType parameter.
func Pluck ¶ added in v0.21.0
Pluck is a function that given a list of object, will map over those objects and return the values at the provided key.
func TrimPrefix ¶ added in v0.21.0
TrimPrefix removes the given string from the front of the input.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.