v0alpha1

package
v0.0.0-...-406fe8c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

Types

type ObjectReference

type ObjectReference struct {
	Resource  string `json:"resource,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`

	// APIGroup is the name of the API group that contains the referred object.
	// The empty string represents the core API group.
	APIGroup string `json:"apiGroup,omitempty"`

	// APIVersion is the version of the API group that contains the referred object.
	APIVersion string `json:"apiVersion,omitempty"`
}

Similar to https://dev-k8sref-io.web.app/docs/common-definitions/objectreference-/ ObjectReference contains enough information to let you inspect or modify the referred object.

type ResourceInfo

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

ResourceInfo helps define a k8s resource +k8s:openapi-gen=false

func NewResourceInfo

func NewResourceInfo(group, version, resourceName, singularName, kind string,
	newObj func() runtime.Object, newList func() runtime.Object) ResourceInfo

func (*ResourceInfo) GetShortNames

func (info *ResourceInfo) GetShortNames() []string

func (*ResourceInfo) GetSingularName

func (info *ResourceInfo) GetSingularName() string

func (*ResourceInfo) GroupResource

func (info *ResourceInfo) GroupResource() schema.GroupResource

func (*ResourceInfo) GroupVersion

func (info *ResourceInfo) GroupVersion() schema.GroupVersion

func (*ResourceInfo) GroupVersionKind

func (info *ResourceInfo) GroupVersionKind() schema.GroupVersionKind

func (*ResourceInfo) GroupVersionResource

func (info *ResourceInfo) GroupVersionResource() schema.GroupVersionResource

func (*ResourceInfo) NewFunc

func (info *ResourceInfo) NewFunc() runtime.Object

func (*ResourceInfo) NewListFunc

func (info *ResourceInfo) NewListFunc() runtime.Object

func (*ResourceInfo) NewNotFound

func (info *ResourceInfo) NewNotFound(name string) *errors.StatusError

func (*ResourceInfo) SingularGroupResource

func (info *ResourceInfo) SingularGroupResource() schema.GroupResource

func (*ResourceInfo) StoragePath

func (info *ResourceInfo) StoragePath(sub ...string) string

func (*ResourceInfo) TypeMeta

func (info *ResourceInfo) TypeMeta() metav1.TypeMeta

TypeMeta returns k8s type

func (*ResourceInfo) WithGroupAndShortName

func (info *ResourceInfo) WithGroupAndShortName(group string, shortName string) ResourceInfo

type Unstructured

type Unstructured struct {
	// Object is a JSON compatible map with string, float, int, bool, []interface{},
	// or map[string]interface{} children.
	Object map[string]any
}

Unstructured allows objects that do not have Golang structs registered to be manipulated generically.

func (*Unstructured) DeepCopy

func (u *Unstructured) DeepCopy() *Unstructured

func (*Unstructured) DeepCopyInto

func (u *Unstructured) DeepCopyInto(out *Unstructured)

func (*Unstructured) GetNestedInt64

func (u *Unstructured) GetNestedInt64(fields ...string) int64

func (*Unstructured) GetNestedString

func (u *Unstructured) GetNestedString(fields ...string) string

func (*Unstructured) GetNestedStringSlice

func (u *Unstructured) GetNestedStringSlice(fields ...string) []string

func (*Unstructured) MarshalJSON

func (u *Unstructured) MarshalJSON() ([]byte, error)

MarshalJSON ensures that the unstructured object produces proper JSON when passed to Go's standard JSON library.

func (Unstructured) OpenAPIDefinition

func (u Unstructured) OpenAPIDefinition() openapi.OpenAPIDefinition

Produce an API definition that represents map[string]any

func (*Unstructured) Remove

func (u *Unstructured) Remove(fields ...string)

func (*Unstructured) Set

func (u *Unstructured) Set(field string, value interface{})

func (*Unstructured) SetNestedField

func (u *Unstructured) SetNestedField(value interface{}, fields ...string)

func (*Unstructured) SetUnstructuredContent

func (u *Unstructured) SetUnstructuredContent(content map[string]interface{})

func (*Unstructured) UnmarshalJSON

func (u *Unstructured) UnmarshalJSON(b []byte) error

UnmarshalJSON ensures that the unstructured object properly decodes JSON when passed to Go's standard JSON library.

func (*Unstructured) UnstructuredContent

func (u *Unstructured) UnstructuredContent() map[string]interface{}

Jump to

Keyboard shortcuts

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