mutation

package
v0.30.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TypeProvider

type TypeProvider struct {
	// contains filtered or unexported fields
}

TypeProvider is a specialized CEL type provider that understands the Object type alias that is used to construct an Apply configuration for a mutation operation.

func NewTypeProviderAndEnvOption

func NewTypeProviderAndEnvOption(resolver common.TypeResolver) (*TypeProvider, cel.EnvOption)

NewTypeProviderAndEnvOption creates the TypeProvider with a given TypeResolver, and also returns the CEL EnvOption to apply it to the env.

func (*TypeProvider) EnumValue

func (p *TypeProvider) EnumValue(enumName string) ref.Val

EnumValue returns the numeric value of the given enum value name. This TypeProvider does not have special handling for EnumValue and thus directly delegate to its underlying type provider.

func (*TypeProvider) FindIdent

func (p *TypeProvider) FindIdent(identName string) (ref.Val, bool)

FindIdent takes a qualified identifier name and returns a ref.ObjectVal if one exists. This TypeProvider does not have special handling for FindIdent and thus directly delegate to its underlying type provider.

func (*TypeProvider) FindStructFieldType

func (p *TypeProvider) FindStructFieldType(structType, fieldName string) (*types.FieldType, bool)

FindStructFieldType returns the field type for a checked type value. Returns false if the field could not be found.

func (*TypeProvider) FindStructType

func (p *TypeProvider) FindStructType(structType string) (*types.Type, bool)

FindStructType returns the Type give a qualified type name, by looking it up with the TypeResolver and translating it to CEL Type. If the type is not known to the TypeResolver, the lookup falls back to the underlying TypeProvider instead.

func (*TypeProvider) NewValue

func (p *TypeProvider) NewValue(structType string, fields map[string]ref.Val) ref.Val

NewValue creates a new type value from a qualified name and map of fields.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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