celext

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultEnv

func DefaultEnv(useUTC bool) (*cel.Env, error)

DefaultEnv produces a cel.Env with the necessary cel.EnvOption and cel.ProgramOption values preconfigured for usage throughout the module. If useUTC is true, timestamp operations use the UTC timezone instead of the local timezone.

func ProtoFieldToCELType added in v0.5.0

func ProtoFieldToCELType(fieldDesc protoreflect.FieldDescriptor, generic, forItems bool) *cel.Type

ProtoFieldToCELType resolves the CEL value type for the provided FieldDescriptor. If generic is true, the specific subtypes of map and repeated fields will be replaced with cel.DynType. If forItems is true, the type for the repeated list items is returned instead of the list type itself.

func RequiredCELEnvOptions added in v0.5.0

func RequiredCELEnvOptions(fieldDesc protoreflect.FieldDescriptor) []cel.EnvOption

RequiredCELEnvOptions returns the options required to have expressions which rely on the provided descriptor.

Types

This section is empty.

Jump to

Keyboard shortcuts

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