Documentation ¶
Index ¶
- Constants
- type DynamicTypeResolver
- type JSONPatchType
- func (r *JSONPatchType) Field(name string) (*types.FieldType, bool)
- func (r *JSONPatchType) FieldNames() ([]string, bool)
- func (r *JSONPatchType) HasTrait(trait int) bool
- func (r *JSONPatchType) Type() *types.Type
- func (r *JSONPatchType) TypeName() string
- func (r *JSONPatchType) Val(fields map[string]ref.Val) ref.Val
- type JSONPatchVal
- func (p *JSONPatchVal) ConvertToNative(typeDesc reflect.Type) (any, error)
- func (p *JSONPatchVal) ConvertToType(typeValue ref.Type) ref.Val
- func (p *JSONPatchVal) Equal(other ref.Val) ref.Val
- func (p *JSONPatchVal) Get(index ref.Val) ref.Val
- func (p *JSONPatchVal) IsSet(field ref.Val) ref.Val
- func (p *JSONPatchVal) Type() ref.Type
- func (p *JSONPatchVal) Value() any
Constants ¶
const JSONPatchTypeName = "JSONPatch"
JSONPatchTypeName is the name of the JSONPatch type. This type is typically used to create JSON patches in CEL expressions.
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.
type JSONPatchVal ¶ added in v0.32.0
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) 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