type Type … const NewExpressions … const StoredExpressions … type EnvSet … func newEnvSet(compatibilityVersion *version.Version, opts []VersionedOptions) (*EnvSet, error) { … } func mustNewEnvSet(ver *version.Version, opts []VersionedOptions) *EnvSet { … } // NewExpressionsEnv returns the NewExpressions environment Type for this EnvSet. // See NewExpressions for details. func (e *EnvSet) NewExpressionsEnv() *cel.Env { … } // StoredExpressionsEnv returns the StoredExpressions environment Type for this EnvSet. // See StoredExpressions for details. func (e *EnvSet) StoredExpressionsEnv() *cel.Env { … } // Env returns the CEL environment for the given Type. func (e *EnvSet) Env(envType Type) (*cel.Env, error) { … } type VersionedOptions … // Extend returns an EnvSet based on this EnvSet but extended with given VersionedOptions. // This EnvSet is not mutated. // The returned EnvSet has the same compatibility version as the EnvSet that was extended. // // Extend is an expensive operation and each call to Extend that adds DeclTypes increases // the depth of a chain of resolvers. For these reasons, calls to Extend should be kept // to a minimum. // // Some best practices: // // - Minimize calls Extend when handling API requests. Where possible, call Extend // when initializing components. // - If an EnvSets returned by Extend can be used to compile multiple CEL programs, // call Extend once and reuse the returned EnvSets. // - Prefer a single call to Extend with a full list of VersionedOptions over // making multiple calls to Extend. func (e *EnvSet) Extend(options ...VersionedOptions) (*EnvSet, error) { … } func (e *EnvSet) filterAndBuildOpts(base *cel.Env, compatVer *version.Version, honorFeatureGateEnablement bool, opts []VersionedOptions) (cel.EnvOption, error) { … } type envLoader … func (e *envLoader) CompileOptions() []cel.EnvOption { … } func (e *envLoader) ProgramOptions() []cel.ProgramOption { … }