expr

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(source string) (cel.Program, error)

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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