package unstructured
import "k8s.io/apiserver/pkg/cel/mutation/unstructured"
Index ¶
- func NewFieldType(name string) *types.FieldType
- type TypeRef
- func NewTypeRef(name string) *TypeRef
- func (r *TypeRef) CELType() *types.Type
- func (r *TypeRef) Field(name string) (*types.FieldType, bool)
- func (r *TypeRef) HasTrait(trait int) bool
- func (r *TypeRef) TypeName() string
- func (r *TypeRef) Val(fields map[string]ref.Val) ref.Val
- type TypeResolver
Functions ¶
func NewFieldType ¶
NewFieldType creates a field by its field name. This version of FieldType is unstructured and has DynType as its type.
Types ¶
type TypeRef ¶
type TypeRef struct {
// contains filtered or unexported fields
}
TypeRef is the implementation of TypeRef for an unstructured object. This is especially usefully when the schema is not known or available.
func NewTypeRef ¶
NewTypeRef creates a TypeRef by the given field name.
func (*TypeRef) CELType ¶
CELType returns the type. The returned type is of TypeType type.
func (*TypeRef) Field ¶
Field looks up the field by name. This is the unstructured version that allows any name as the field name. The returned field is of DynType type.
func (*TypeRef) HasTrait ¶
func (*TypeRef) TypeName ¶
TypeName returns the name of this TypeRef.
func (*TypeRef) Val ¶
Val returns an instance given the fields.
type TypeResolver ¶
type TypeResolver struct { }
func (*TypeResolver) Resolve ¶
func (r *TypeResolver) Resolve(name string) (common.TypeRef, bool)
Resolve resolves the TypeRef for the given type name that starts with "Object". This is the unstructured version, which means the returned TypeRef does not refer to the schema.
Source Files ¶
fieldtype.go typeref.go typeresolver.go
- Version
- v0.30.13
- Published
- May 15, 2025
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 1 minute ago –
Tools for package owners.