Documentation ¶
Index ¶
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func RegisterDefaults(scheme *runtime.Scheme) error
- type ObjectReference
- type ResourceInfo
- func (info *ResourceInfo) GetShortNames() []string
- func (info *ResourceInfo) GetSingularName() string
- func (info *ResourceInfo) GroupResource() schema.GroupResource
- func (info *ResourceInfo) GroupVersion() schema.GroupVersion
- func (info *ResourceInfo) GroupVersionKind() schema.GroupVersionKind
- func (info *ResourceInfo) GroupVersionResource() schema.GroupVersionResource
- func (info *ResourceInfo) NewFunc() runtime.Object
- func (info *ResourceInfo) NewListFunc() runtime.Object
- func (info *ResourceInfo) NewNotFound(name string) *errors.StatusError
- func (info *ResourceInfo) SingularGroupResource() schema.GroupResource
- func (info *ResourceInfo) StoragePath(sub ...string) string
- func (info *ResourceInfo) TypeMeta() metav1.TypeMeta
- func (info *ResourceInfo) WithGroupAndShortName(group string, shortName string) ResourceInfo
- type Unstructured
- func (u *Unstructured) DeepCopy() *Unstructured
- func (u *Unstructured) DeepCopyInto(out *Unstructured)
- func (u *Unstructured) GetNestedInt64(fields ...string) int64
- func (u *Unstructured) GetNestedString(fields ...string) string
- func (u *Unstructured) GetNestedStringSlice(fields ...string) []string
- func (u *Unstructured) MarshalJSON() ([]byte, error)
- func (u Unstructured) OpenAPIDefinition() openapi.OpenAPIDefinition
- func (u *Unstructured) Remove(fields ...string)
- func (u *Unstructured) Set(field string, value interface{})
- func (u *Unstructured) SetNestedField(value interface{}, fields ...string)
- func (u *Unstructured) SetUnstructuredContent(content map[string]interface{})
- func (u *Unstructured) UnmarshalJSON(b []byte) error
- func (u *Unstructured) UnstructuredContent() map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func RegisterDefaults ¶
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 (*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{}