testing

package
v0.0.0-...-8a05c22 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=pkg.knative.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "pkg.knative.dev", Version: "v2"}

SchemeGroupVersion is group version used to register these objects

Functions

This section is empty.

Types

type Resource

type Resource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ResourceSpec `json:"spec,omitempty"`
}

Resource is a simple resource that's compatible with our webhook

func (*Resource) CheckImmutableFields

func (current *Resource) CheckImmutableFields(og apis.Immutable) *apis.FieldError

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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

func (*Resource) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Resource) GetListType

func (r *Resource) GetListType() runtime.Object

GetListType implements apis.Listable

func (*Resource) SetDefaults

func (c *Resource) SetDefaults()

func (*Resource) Validate

func (c *Resource) Validate() *apis.FieldError

type ResourceList

type ResourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Resource `json:"items"`
}

ResourceList is a list of Resource resources

func (*ResourceList) DeepCopy

func (in *ResourceList) DeepCopy() *ResourceList

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

func (*ResourceList) DeepCopyInto

func (in *ResourceList) DeepCopyInto(out *ResourceList)

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

func (*ResourceList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResourceSpec

type ResourceSpec struct {
	Generation int64 `json:"generation,omitempty"`

	FieldWithDefault               string `json:"fieldWithDefault,omitempty"`
	FieldWithValidation            string `json:"fieldWithValidation,omitempty"`
	FieldThatsImmutable            string `json:"fieldThatsImmutable,omitempty"`
	FieldThatsImmutableWithDefault string `json:"fieldThatsImmutableWithDefault,omitempty"`
}

Check that we implement the Generation duck type.

func (*ResourceSpec) DeepCopy

func (in *ResourceSpec) DeepCopy() *ResourceSpec

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

func (*ResourceSpec) DeepCopyInto

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

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

func (*ResourceSpec) SetDefaults

func (cs *ResourceSpec) SetDefaults()

func (*ResourceSpec) Validate

func (cs *ResourceSpec) Validate() *apis.FieldError

Jump to

Keyboard shortcuts

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