Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{
Group: "todoexample.com",
Version: "v1",
}
Define your schema name and the version
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Todo ¶
type Todo struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // This is where you can define // your own custom spec Spec TodoSpec `json:"spec,omitempty"` }
Todo is a top-level type
func (*Todo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Todo.
func (*Todo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Todo) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TodoList ¶
type TodoList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` Items []Todo `json:"items"` }
no client needed for list as it's been created in above
func (*TodoList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TodoList.
func (*TodoList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TodoList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TodoSpec ¶
type TodoSpec struct { Message string `json:"message,omitempty"` When v1.Time `json:"when,omitempty"` }
custom spec
func (*TodoSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TodoSpec.
func (*TodoSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.