Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
- func RegisterDefaults(scheme *runtime.Scheme) error
- type APIType
- type APITypeList
- type Kind
- type Object
- type ObjectMeta
- func (in *ObjectMeta) DeepCopy() *ObjectMeta
- func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
- func (o *ObjectMeta) GetAnnotation(key string) string
- func (o *ObjectMeta) GetCreated() Time
- func (o *ObjectMeta) GetLabel(key string) string
- func (o *ObjectMeta) GetName() string
- func (o *ObjectMeta) GetObjectMeta() *ObjectMeta
- func (o *ObjectMeta) GetUID() UID
- func (o *ObjectMeta) SetAnnotation(key, value string)
- func (o *ObjectMeta) SetCreated(t Time)
- func (o *ObjectMeta) SetLabel(key, value string)
- func (o *ObjectMeta) SetName(name string)
- func (o *ObjectMeta) SetUID(uid UID)
- type Time
- type TypeMeta
- type UID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 APIType ¶
type APIType struct { *TypeMeta `json:",inline"` *ObjectMeta `json:"metadata"` }
APIType is a struct implementing Object, used for unmarshalling unknown objects into this intermediate type where .Name, .UID, .Kind and .APIVersion become easily available +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func APITypeFrom ¶
APITypeFrom is used to create a bound APIType from an Object
func NewAPIType ¶
func NewAPIType() *APIType
This constructor ensures the APIType fields are not nil
func (*APIType) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIType.
func (*APIType) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*APIType) DeepCopyObject ¶
func (in *APIType) DeepCopyObject() pkgruntime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new pkgruntime.Object.
type APITypeList ¶
type APITypeList []*APIType
APITypeList is a list of many pointers APIType objects
func (APITypeList) DeepCopy ¶
func (in APITypeList) DeepCopy() APITypeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APITypeList.
func (APITypeList) DeepCopyInto ¶
func (in APITypeList) DeepCopyInto(out *APITypeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Kind ¶
type Kind string
type Object ¶
type Object interface { runtime.Object GetTypeMeta() *TypeMeta GetObjectMeta() *ObjectMeta GetKind() Kind GroupVersionKind() schema.GroupVersionKind SetGroupVersionKind(schema.GroupVersionKind) GetName() string SetName(string) GetUID() UID SetUID(UID) GetCreated() Time SetCreated(t Time) GetLabel(key string) string SetLabel(key, value string) GetAnnotation(key string) string SetAnnotation(key, value string) }
Object extends k8s.io/apimachinery's runtime.Object with extra GetName() and GetUID() methods from ObjectMeta
type ObjectMeta ¶
type ObjectMeta struct { Name string `json:"name"` UID UID `json:"uid,omitempty"` Created Time `json:"created"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
ObjectMeta have to be embedded into any serializable object. It provides the .GetName() and .GetUID() methods that help implement the Object interface
func (*ObjectMeta) DeepCopy ¶
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ObjectMeta) GetAnnotation ¶
func (o *ObjectMeta) GetAnnotation(key string) string
GetAnnotation returns the label value for the key
func (*ObjectMeta) GetCreated ¶
func (o *ObjectMeta) GetCreated() Time
GetCreated returns when the Object was created
func (*ObjectMeta) GetLabel ¶
func (o *ObjectMeta) GetLabel(key string) string
GetLabel returns the label value for the key
func (*ObjectMeta) GetName ¶
func (o *ObjectMeta) GetName() string
GetName returns the name of the Object
func (*ObjectMeta) GetObjectMeta ¶
func (o *ObjectMeta) GetObjectMeta() *ObjectMeta
This is a helper for APIType generation
func (*ObjectMeta) SetAnnotation ¶
func (o *ObjectMeta) SetAnnotation(key, value string)
SetAnnotation sets a label value for a key
func (*ObjectMeta) SetCreated ¶
func (o *ObjectMeta) SetCreated(t Time)
SetCreated sets the creation time of the Object
func (*ObjectMeta) SetLabel ¶
func (o *ObjectMeta) SetLabel(key, value string)
SetLabel sets a label value for a key
func (*ObjectMeta) SetName ¶
func (o *ObjectMeta) SetName(name string)
SetName sets the name of the Object
type Time ¶
func (*Time) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time.
func (*Time) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Time) MarshalJSON ¶
type TypeMeta ¶
TypeMeta is an alias for the k8s/apimachinery TypeMeta with some additional methods
func (*TypeMeta) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeMeta.
func (*TypeMeta) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TypeMeta) GetTypeMeta ¶
This is a helper for APIType generation
func (*TypeMeta) GroupVersionKind ¶
func (t *TypeMeta) GroupVersionKind() schema.GroupVersionKind
func (*TypeMeta) SetGroupVersionKind ¶
func (t *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind)
type UID ¶
type UID string
UID represents an unique ID for a type
func (*UID) UnmarshalJSON ¶
This unmarshaler enables the UID to be passed in as an unquoted string in JSON. Upon marshaling, quotes will be automatically added.