mutation

package
v0.32.0-rc.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const JSONPatchTypeName = "JSONPatch"

JSONPatchTypeName is the name of the JSONPatch type. This type is typically used to create JSON patches in CEL expressions.

View Source
const ObjectTypeName = "Object"

ObjectTypeName is the name of Object types that are used to declare the types of Kubernetes objects in CEL dynamically using the naming scheme "Object.<fieldName>...<fieldName>". For example "Object.spec.containers" is the type of the spec.containers field of the object in scope.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicTypeResolver added in v0.32.0

type DynamicTypeResolver struct{}

DynamicTypeResolver resolves the Object and JSONPatch types when compiling CEL expressions without schema information about the object.

func (*DynamicTypeResolver) Resolve added in v0.32.0

func (r *DynamicTypeResolver) Resolve(name string) (common.ResolvedType, bool)

type JSONPatchType added in v0.32.0

type JSONPatchType struct{}

JSONPatchType provides a CEL type for "JSONPatch" operations.

func (*JSONPatchType) Field added in v0.32.0

func (r *JSONPatchType) Field(name string) (*types.FieldType, bool)

func (*JSONPatchType) FieldNames added in v0.32.0

func (r *JSONPatchType) FieldNames() ([]string, bool)

func (*JSONPatchType) HasTrait added in v0.32.0

func (r *JSONPatchType) HasTrait(trait int) bool

func (*JSONPatchType) Type added in v0.32.0

func (r *JSONPatchType) Type() *types.Type

func (*JSONPatchType) TypeName added in v0.32.0

func (r *JSONPatchType) TypeName() string

TypeName returns the name of this ObjectType.

func (*JSONPatchType) Val added in v0.32.0

func (r *JSONPatchType) Val(fields map[string]ref.Val) ref.Val

Val returns an instance given the fields.

type JSONPatchVal added in v0.32.0

type JSONPatchVal struct {
	Op, From, Path string
	Val            ref.Val
}

JSONPatchVal is the ref.Val for a JSONPatch.

func (*JSONPatchVal) ConvertToNative added in v0.32.0

func (p *JSONPatchVal) ConvertToNative(typeDesc reflect.Type) (any, error)

func (*JSONPatchVal) ConvertToType added in v0.32.0

func (p *JSONPatchVal) ConvertToType(typeValue ref.Type) ref.Val

func (*JSONPatchVal) Equal added in v0.32.0

func (p *JSONPatchVal) Equal(other ref.Val) ref.Val

func (*JSONPatchVal) Get added in v0.32.0

func (p *JSONPatchVal) Get(index ref.Val) ref.Val

func (*JSONPatchVal) IsSet added in v0.32.0

func (p *JSONPatchVal) IsSet(field ref.Val) ref.Val

func (*JSONPatchVal) Type added in v0.32.0

func (p *JSONPatchVal) Type() ref.Type

func (*JSONPatchVal) Value added in v0.32.0

func (p *JSONPatchVal) Value() any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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