Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +groupName=pkg.knative.dev
Index ¶
- Variables
- func WithValue(ctx context.Context, val string) context.Context
- type InlinedPtrStruct
- type InlinedStruct
- type InnerDefaultResource
- func (in *InnerDefaultResource) DeepCopy() *InnerDefaultResource
- func (in *InnerDefaultResource) DeepCopyInto(out *InnerDefaultResource)
- func (in *InnerDefaultResource) DeepCopyObject() runtime.Object
- func (i *InnerDefaultResource) SetDefaults(ctx context.Context)
- func (i *InnerDefaultResource) Validate(ctx context.Context) *apis.FieldError
- type InnerDefaultSpec
- type InnerDefaultStatus
- type InnerDefaultStruct
- type InnerDefaultSubSpec
- type OnContext
- type Resource
- func (r *Resource) CheckAllowedSubresourceUpdate(ctx context.Context, original *Resource) *apis.FieldError
- func (r *Resource) CheckImmutableFields(ctx context.Context, original *Resource) *apis.FieldError
- func (in *Resource) DeepCopy() *Resource
- func (in *Resource) DeepCopyInto(out *Resource)
- func (in *Resource) DeepCopyObject() runtime.Object
- func (r *Resource) GetGroupVersionKind() schema.GroupVersionKind
- func (r *Resource) GetGroupVersionKindMeta() metav1.GroupVersionKind
- func (r *Resource) GetListType() runtime.Object
- func (r *Resource) GetUntypedSpec() interface{}
- func (r *Resource) SetDefaults(ctx context.Context)
- func (r *Resource) Validate(ctx context.Context) *apis.FieldError
- type ResourceList
- type ResourceSpec
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder builds a scheme with the types known to the package. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types known to this package to an existing schema. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: "pkg.knative.dev", Version: "v2"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
Types ¶
type InlinedPtrStruct ¶
type InlinedPtrStruct struct { // Deprecated: This field is deprecated. DeprecatedField string `json:"fieldB,omitempty"` }
func (*InlinedPtrStruct) DeepCopy ¶
func (in *InlinedPtrStruct) DeepCopy() *InlinedPtrStruct
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlinedPtrStruct.
func (*InlinedPtrStruct) DeepCopyInto ¶
func (in *InlinedPtrStruct) DeepCopyInto(out *InlinedPtrStruct)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InlinedStruct ¶
type InlinedStruct struct { // Deprecated: This field is deprecated. DeprecatedField string `json:"fieldA,omitempty"` *InlinedPtrStruct `json:",inline"` }
func (*InlinedStruct) DeepCopy ¶
func (in *InlinedStruct) DeepCopy() *InlinedStruct
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InlinedStruct.
func (*InlinedStruct) DeepCopyInto ¶
func (in *InlinedStruct) DeepCopyInto(out *InlinedStruct)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InnerDefaultResource ¶
type InnerDefaultResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Note that this does _not_ have omitempty. So when JSON is round tripped through the Golang // type, `spec: {}` will automatically be injected. Spec InnerDefaultSpec `json:"spec"` // Status is a simple status. Status InnerDefaultStatus `json:"status,omitempty"` }
InnerDefaultResource is a simple resource that's compatible with our webhook. It differs from Resource by not omitting empty `spec`, so can change when it round trips JSON -> Golang type -> JSON.
func (*InnerDefaultResource) DeepCopy ¶
func (in *InnerDefaultResource) DeepCopy() *InnerDefaultResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerDefaultResource.
func (*InnerDefaultResource) DeepCopyInto ¶
func (in *InnerDefaultResource) DeepCopyInto(out *InnerDefaultResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InnerDefaultResource) DeepCopyObject ¶
func (in *InnerDefaultResource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*InnerDefaultResource) SetDefaults ¶
func (i *InnerDefaultResource) SetDefaults(ctx context.Context)
SetDefaults sets default values.
func (*InnerDefaultResource) Validate ¶
func (i *InnerDefaultResource) Validate(ctx context.Context) *apis.FieldError
Validate validates the resource.
type InnerDefaultSpec ¶
type InnerDefaultSpec struct { Generation int64 `json:"generation,omitempty"` FieldWithDefault string `json:"fieldWithDefault,omitempty"` // Deprecated: This field is deprecated, and will emit an error if set. DeprecatedField string `json:"field,omitempty"` // ToBeDeprecatedField: This field is deprecated, and will emit a warning // if set. ToBeDeprecatedField string `json:"fieldWillWarn,omitempty"` SubFields *InnerDefaultSubSpec `json:"subfields,omitempty"` }
InnerDefaultSpec is the spec for InnerDefaultResource.
func (*InnerDefaultSpec) DeepCopy ¶
func (in *InnerDefaultSpec) DeepCopy() *InnerDefaultSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerDefaultSpec.
func (*InnerDefaultSpec) DeepCopyInto ¶
func (in *InnerDefaultSpec) DeepCopyInto(out *InnerDefaultSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InnerDefaultSpec) SetDefaults ¶
func (cs *InnerDefaultSpec) SetDefaults(ctx context.Context)
SetDefaults sets default values.
type InnerDefaultStatus ¶
type InnerDefaultStatus struct {
FieldAsString string `json:"fieldAsString,omitempty"`
}
InnerDefaultStatus is the status for InnerDefaultResource.
func (*InnerDefaultStatus) DeepCopy ¶
func (in *InnerDefaultStatus) DeepCopy() *InnerDefaultStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerDefaultStatus.
func (*InnerDefaultStatus) DeepCopyInto ¶
func (in *InnerDefaultStatus) DeepCopyInto(out *InnerDefaultStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InnerDefaultStruct ¶
type InnerDefaultStruct struct { FieldAsString string `json:"fieldAsString,omitempty"` // Deprecated: This field is deprecated. DeprecatedField string `json:"field,omitempty"` }
InnerDefaultStruct is a helper to test defaulting of an inner struct.
func (*InnerDefaultStruct) DeepCopy ¶
func (in *InnerDefaultStruct) DeepCopy() *InnerDefaultStruct
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerDefaultStruct.
func (*InnerDefaultStruct) DeepCopyInto ¶
func (in *InnerDefaultStruct) DeepCopyInto(out *InnerDefaultStruct)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InnerDefaultSubSpec ¶
type InnerDefaultSubSpec struct { // Deprecated: This field is deprecated. DeprecatedString string `json:"string,omitempty"` // Deprecated: This field is deprecated. DeprecatedStringPtr *string `json:"stringPtr,omitempty"` // Deprecated: This field is deprecated. DeprecatedInt int64 `json:"int,omitempty"` // Deprecated: This field is deprecated. DeprecatedIntPtr *int64 `json:"intPtr,omitempty"` // Deprecated: This field is deprecated. DeprecatedMap map[string]string `json:"map,omitempty"` // Deprecated: This field is deprecated. DeprecatedSlice []string `json:"slice,omitempty"` // Deprecated: This field is deprecated. DeprecatedStruct InnerDefaultStruct `json:"struct,omitempty"` // Deprecated: This field is deprecated. DeprecatedStructPtr *InnerDefaultStruct `json:"structPtr,omitempty"` InlinedStruct `json:",inline"` *InlinedPtrStruct `json:",inline"` // Deprecated: This field is deprecated. DeprecatedNotJSON string }
InnerDefaultSubSpec is a helper to test strict deprecated validation.
func (*InnerDefaultSubSpec) DeepCopy ¶
func (in *InnerDefaultSubSpec) DeepCopy() *InnerDefaultSubSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InnerDefaultSubSpec.
func (*InnerDefaultSubSpec) DeepCopyInto ¶
func (in *InnerDefaultSubSpec) DeepCopyInto(out *InnerDefaultSubSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OnContext ¶
type OnContext struct {
Value string
}
OnContext is a struct for holding a value attached to a context.
func (*OnContext) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OnContext.
func (*OnContext) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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) CheckAllowedSubresourceUpdate ¶
func (*Resource) CheckImmutableFields ¶
func (*Resource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Resource) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Resource) GetGroupVersionKind ¶
func (r *Resource) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns the GroupVersionKind.
func (*Resource) GetGroupVersionKindMeta ¶
func (r *Resource) GetGroupVersionKindMeta() metav1.GroupVersionKind
GetGroupVersionKindMeta returns the metav1.GroupVersionKind.
func (*Resource) GetListType ¶
GetListType implements apis.Listable
func (*Resource) GetUntypedSpec ¶
func (r *Resource) GetUntypedSpec() interface{}
GetUntypedSpec returns the spec of the resource.
func (*Resource) SetDefaults ¶
SetDefaults sets the defaults on the object.
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 { FieldWithDefault string `json:"fieldWithDefault,omitempty"` FieldWithContextDefault string `json:"fieldWithContextDefault,omitempty"` FieldWithValidation string `json:"fieldWithValidation,omitempty"` FieldThatsImmutable string `json:"fieldThatsImmutable,omitempty"` FieldThatsImmutableWithDefault string `json:"fieldThatsImmutableWithDefault,omitempty"` FieldForCallbackValidation string `json:"fieldThatCallbackRejects,omitempty"` FieldForCallbackDefaulting string `json:"fieldForCallbackDefaulting,omitempty"` FieldForCallbackDefaultingIsWithinUpdate bool `json:"fieldForCallbackDefaultingIsWithinUpdate,omitempty"` FieldForCallbackDefaultingUsername string `json:"fieldForCallbackDefaultingUsername,omitempty"` }
ResourceSpec represents test resource spec.
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(ctx context.Context)
SetDefaults sets the defaults on the spec.
func (*ResourceSpec) Validate ¶
func (cs *ResourceSpec) Validate(ctx context.Context) *apis.FieldError