v1

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
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

func (in *Todo) DeepCopy() *Todo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Todo.

func (*Todo) DeepCopyInto

func (in *Todo) DeepCopyInto(out *Todo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Todo) DeepCopyObject

func (in *Todo) DeepCopyObject() runtime.Object

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

func (in *TodoList) DeepCopy() *TodoList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TodoList.

func (*TodoList) DeepCopyInto

func (in *TodoList) DeepCopyInto(out *TodoList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TodoList) DeepCopyObject

func (in *TodoList) DeepCopyObject() runtime.Object

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

func (in *TodoSpec) DeepCopy() *TodoSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TodoSpec.

func (*TodoSpec) DeepCopyInto

func (in *TodoSpec) DeepCopyInto(out *TodoSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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