cel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedType is returned when the type is not supported.
	ErrUnsupportedType = errors.New("unsupported type")
)

Functions

func DefaultEnvironment

func DefaultEnvironment(options ...EnvOption) (*cel.Env, error)

DefaultEnvironment returns the default CEL environment.

func GoNativeType

func GoNativeType(v ref.Val) (interface{}, error)

GoNativeType transforms CEL output into corresponding Go types

func IsBoolType

func IsBoolType(v ref.Val) bool

IsBoolType checks if the given ref.Val is of type BoolType

Types

type EnvOption

type EnvOption func(*envOptions)

EnvOption is a function that modifies the environment options.

func WithCustomDeclarations

func WithCustomDeclarations(declarations []cel.EnvOption) EnvOption

WithCustomDeclarations adds custom declarations to the CEL environment.

func WithResourceIDs

func WithResourceIDs(ids []string) EnvOption

WithResourceIDs adds resource ids that will be declared as CEL variables.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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