unstructured

package
v0.30.0-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFieldType

func NewFieldType(name string) *types.FieldType

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

func NewTypeRef(name string) *TypeRef

NewTypeRef creates a TypeRef by the given field name.

func (*TypeRef) CELType

func (r *TypeRef) CELType() *types.Type

CELType returns the type. The returned type is of TypeType type.

func (*TypeRef) Field

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

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 (r *TypeRef) HasTrait(trait int) bool

func (*TypeRef) TypeName

func (r *TypeRef) TypeName() string

TypeName returns the name of this TypeRef.

func (*TypeRef) Val

func (r *TypeRef) Val(fields map[string]ref.Val) ref.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.

Jump to

Keyboard shortcuts

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