Add discovery types
This commit is contained in:
21
pkg/apis/apidiscovery/doc.go
Normal file
21
pkg/apis/apidiscovery/doc.go
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +groupName=apidiscovery.k8s.io
|
||||
|
||||
// Package apidiscovery provides api definitions for the "apidiscovery.k8s.io" api group.
|
||||
package apidiscovery // import "k8s.io/kubernetes/pkg/apis/apidiscovery"
|
54
pkg/apis/apidiscovery/register.go
Normal file
54
pkg/apis/apidiscovery/register.go
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package apidiscovery
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the name of api group
|
||||
const GroupName = "apidiscovery.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
|
||||
|
||||
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||
func Kind(kind string) schema.GroupKind {
|
||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// SchemeBuilder installs the api group to a scheme
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
// AddToScheme adds api to a scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to the given scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&APIGroupDiscoveryList{},
|
||||
&APIGroupDiscovery{},
|
||||
)
|
||||
return nil
|
||||
}
|
156
pkg/apis/apidiscovery/types.go
Normal file
156
pkg/apis/apidiscovery/types.go
Normal file
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package apidiscovery
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
|
||||
// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
|
||||
// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
|
||||
// that a cluster supports.
|
||||
type APIGroupDiscoveryList struct {
|
||||
v1.TypeMeta
|
||||
// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
v1.ListMeta
|
||||
// items is the list of groups for discovery. The groups are listed in priority order.
|
||||
Items []APIGroupDiscovery
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// APIGroupDiscovery holds information about which resources are being served for all version of the API Group.
|
||||
// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
|
||||
// Versions are in descending order of preference, with the first version being the preferred entry.
|
||||
type APIGroupDiscovery struct {
|
||||
v1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// The only field completed will be name. For instance, resourceVersion will be empty.
|
||||
// name is the name of the API group whose discovery information is presented here.
|
||||
// name is allowed to be "" to represent the legacy, ungroupified resources.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
v1.ObjectMeta
|
||||
// versions are the versions supported in this group. They are sorted in descending order of preference,
|
||||
// with the preferred version being the first entry.
|
||||
// +listType=map
|
||||
// +listMapKey=version
|
||||
Versions []APIVersionDiscovery
|
||||
}
|
||||
|
||||
// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
|
||||
type APIVersionDiscovery struct {
|
||||
// version is the name of the version within a group version.
|
||||
Version string
|
||||
// resources is a list of APIResourceDiscovery objects for the corresponding group version.
|
||||
// +listType=map
|
||||
// +listMapKey=resource
|
||||
Resources []APIResourceDiscovery
|
||||
// freshness marks whether a group version's discovery document is up to date.
|
||||
// "Current" indicates the discovery document was recently
|
||||
// refreshed. "Stale" indicates the discovery document could not
|
||||
// be retrieved and the returned discovery document may be
|
||||
// significantly out of date. Clients that require the latest
|
||||
// version of the discovery information be retrieved before
|
||||
// performing an operation should not use the aggregated document
|
||||
// and instead retrieve the necessary version docs directly.
|
||||
Freshness DiscoveryFreshness
|
||||
}
|
||||
|
||||
// APIResourceDiscovery provides information about an API resource for discovery.
|
||||
type APIResourceDiscovery struct {
|
||||
// resource is the plural name of the resource. This is used in the URL path and is the unique identifier
|
||||
// for this resource across all versions in the API group.
|
||||
// Resources with non-empty groups are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
|
||||
// Resources with empty groups are located at /api/v1/<APIResourceDiscovery.Resource>
|
||||
Resource string
|
||||
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
|
||||
// APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior.
|
||||
// This value will be null if an APIService reports subresources but supports no operations on the parent resource
|
||||
ResponseKind *v1.GroupVersionKind
|
||||
// scope indicates the scope of a resource, either Cluster or Namespaced
|
||||
Scope ResourceScope
|
||||
// singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely.
|
||||
// For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence.
|
||||
// The command line tool kubectl, for example, allows use of the singular resource name in place of plurals.
|
||||
// The singular form of a resource should always be an optional element - when in doubt use the canonical resource name.
|
||||
SingularResource string
|
||||
// verbs is a list of supported API operation types (this includes
|
||||
// but is not limited to get, list, watch, create, update, patch,
|
||||
// delete, deletecollection, and proxy).
|
||||
// +listType=set
|
||||
Verbs []string
|
||||
// shortNames is a list of suggested short names of the resource.
|
||||
// +listType=set
|
||||
ShortNames []string
|
||||
// categories is a list of the grouped resources this resource belongs to (e.g. 'all').
|
||||
// Clients may use this to simplify acting on multiple resource types at once.
|
||||
// +listType=set
|
||||
Categories []string
|
||||
// subresources is a list of subresources provided by this resource. Subresources are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>/name-of-instance/<APIResourceDiscovery.subresources[i].subresource>
|
||||
// +listType=map
|
||||
// +listMapKey=subresource
|
||||
Subresources []APISubresourceDiscovery
|
||||
}
|
||||
|
||||
// ResourceScope is an enum defining the different scopes available to a resource.
|
||||
type ResourceScope string
|
||||
|
||||
const (
|
||||
ScopeCluster ResourceScope = "Cluster"
|
||||
ScopeNamespace ResourceScope = "Namespaced"
|
||||
)
|
||||
|
||||
// DiscoveryFreshness is an enum defining whether the Discovery document published by an apiservice is up to date (fresh).
|
||||
type DiscoveryFreshness string
|
||||
|
||||
const (
|
||||
DiscoveryFreshnessCurrent DiscoveryFreshness = "Current"
|
||||
DiscoveryFreshnessStale DiscoveryFreshness = "Stale"
|
||||
)
|
||||
|
||||
// APISubresourceDiscovery provides information about an API subresource for discovery.
|
||||
type APISubresourceDiscovery struct {
|
||||
// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
|
||||
// for this resource across all versions.
|
||||
Subresource string
|
||||
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
|
||||
// Some subresources do not return normal resources, these will have null return types.
|
||||
ResponseKind *v1.GroupVersionKind
|
||||
// acceptedTypes describes the kinds that this endpoint accepts.
|
||||
// Subresources may accept the standard content types or define
|
||||
// custom negotiation schemes. The list may not be exhaustive for
|
||||
// all operations.
|
||||
// +listType=map
|
||||
// +listMapKey=group
|
||||
// +listMapKey=version
|
||||
// +listMapKey=kind
|
||||
AcceptedTypes []v1.GroupVersionKind
|
||||
// verbs is a list of supported API operation types (this includes
|
||||
// but is not limited to get, list, watch, create, update, patch,
|
||||
// delete, deletecollection, and proxy). Subresources may define
|
||||
// custom verbs outside the standard Kubernetes verb set. Clients
|
||||
// should expect the behavior of standard verbs to align with
|
||||
// Kubernetes interaction conventions.
|
||||
// +listType=set
|
||||
Verbs []string
|
||||
}
|
24
pkg/apis/apidiscovery/v2beta1/doc.go
Normal file
24
pkg/apis/apidiscovery/v2beta1/doc.go
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apidiscovery
|
||||
// +k8s:conversion-gen-external-types=k8s.io/api/apidiscovery/v2beta1
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:defaulter-gen-input=k8s.io/api/apidiscovery/v2beta1
|
||||
|
||||
// +groupName=apidiscovery.k8s.io
|
||||
|
||||
package v2beta1 // import "k8s.io/kubernetes/pkg/apis/apidiscovery/v2beta1"
|
39
pkg/apis/apidiscovery/v2beta1/register.go
Normal file
39
pkg/apis/apidiscovery/v2beta1/register.go
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "apidiscovery.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
localSchemeBuilder = &apidiscoveryv2beta1.SchemeBuilder
|
||||
// AddToScheme adds api to a scheme
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
220
pkg/apis/apidiscovery/v2beta1/zz_generated.conversion.go
generated
Normal file
220
pkg/apis/apidiscovery/v2beta1/zz_generated.conversion.go
generated
Normal file
@@ -0,0 +1,220 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
v2beta1 "k8s.io/api/apidiscovery/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
apidiscovery "k8s.io/kubernetes/pkg/apis/apidiscovery"
|
||||
)
|
||||
|
||||
func init() {
|
||||
localSchemeBuilder.Register(RegisterConversions)
|
||||
}
|
||||
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(s *runtime.Scheme) error {
|
||||
if err := s.AddGeneratedConversionFunc((*v2beta1.APIGroupDiscovery)(nil), (*apidiscovery.APIGroupDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(a.(*v2beta1.APIGroupDiscovery), b.(*apidiscovery.APIGroupDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIGroupDiscovery)(nil), (*v2beta1.APIGroupDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(a.(*apidiscovery.APIGroupDiscovery), b.(*v2beta1.APIGroupDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v2beta1.APIGroupDiscoveryList)(nil), (*apidiscovery.APIGroupDiscoveryList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(a.(*v2beta1.APIGroupDiscoveryList), b.(*apidiscovery.APIGroupDiscoveryList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIGroupDiscoveryList)(nil), (*v2beta1.APIGroupDiscoveryList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(a.(*apidiscovery.APIGroupDiscoveryList), b.(*v2beta1.APIGroupDiscoveryList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v2beta1.APIResourceDiscovery)(nil), (*apidiscovery.APIResourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(a.(*v2beta1.APIResourceDiscovery), b.(*apidiscovery.APIResourceDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIResourceDiscovery)(nil), (*v2beta1.APIResourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(a.(*apidiscovery.APIResourceDiscovery), b.(*v2beta1.APIResourceDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v2beta1.APISubresourceDiscovery)(nil), (*apidiscovery.APISubresourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(a.(*v2beta1.APISubresourceDiscovery), b.(*apidiscovery.APISubresourceDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*apidiscovery.APISubresourceDiscovery)(nil), (*v2beta1.APISubresourceDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(a.(*apidiscovery.APISubresourceDiscovery), b.(*v2beta1.APISubresourceDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v2beta1.APIVersionDiscovery)(nil), (*apidiscovery.APIVersionDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(a.(*v2beta1.APIVersionDiscovery), b.(*apidiscovery.APIVersionDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*apidiscovery.APIVersionDiscovery)(nil), (*v2beta1.APIVersionDiscovery)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(a.(*apidiscovery.APIVersionDiscovery), b.(*v2beta1.APIVersionDiscovery), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(in *v2beta1.APIGroupDiscovery, out *apidiscovery.APIGroupDiscovery, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Versions = *(*[]apidiscovery.APIVersionDiscovery)(unsafe.Pointer(&in.Versions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery is an autogenerated conversion function.
|
||||
func Convert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(in *v2beta1.APIGroupDiscovery, out *apidiscovery.APIGroupDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_v2beta1_APIGroupDiscovery_To_apidiscovery_APIGroupDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(in *apidiscovery.APIGroupDiscovery, out *v2beta1.APIGroupDiscovery, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
out.Versions = *(*[]v2beta1.APIVersionDiscovery)(unsafe.Pointer(&in.Versions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery is an autogenerated conversion function.
|
||||
func Convert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(in *apidiscovery.APIGroupDiscovery, out *v2beta1.APIGroupDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_apidiscovery_APIGroupDiscovery_To_v2beta1_APIGroupDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(in *v2beta1.APIGroupDiscoveryList, out *apidiscovery.APIGroupDiscoveryList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]apidiscovery.APIGroupDiscovery)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList is an autogenerated conversion function.
|
||||
func Convert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(in *v2beta1.APIGroupDiscoveryList, out *apidiscovery.APIGroupDiscoveryList, s conversion.Scope) error {
|
||||
return autoConvert_v2beta1_APIGroupDiscoveryList_To_apidiscovery_APIGroupDiscoveryList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(in *apidiscovery.APIGroupDiscoveryList, out *v2beta1.APIGroupDiscoveryList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]v2beta1.APIGroupDiscovery)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList is an autogenerated conversion function.
|
||||
func Convert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(in *apidiscovery.APIGroupDiscoveryList, out *v2beta1.APIGroupDiscoveryList, s conversion.Scope) error {
|
||||
return autoConvert_apidiscovery_APIGroupDiscoveryList_To_v2beta1_APIGroupDiscoveryList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(in *v2beta1.APIResourceDiscovery, out *apidiscovery.APIResourceDiscovery, s conversion.Scope) error {
|
||||
out.Resource = in.Resource
|
||||
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
|
||||
out.Scope = apidiscovery.ResourceScope(in.Scope)
|
||||
out.SingularResource = in.SingularResource
|
||||
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
|
||||
out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames))
|
||||
out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories))
|
||||
out.Subresources = *(*[]apidiscovery.APISubresourceDiscovery)(unsafe.Pointer(&in.Subresources))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery is an autogenerated conversion function.
|
||||
func Convert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(in *v2beta1.APIResourceDiscovery, out *apidiscovery.APIResourceDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_v2beta1_APIResourceDiscovery_To_apidiscovery_APIResourceDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(in *apidiscovery.APIResourceDiscovery, out *v2beta1.APIResourceDiscovery, s conversion.Scope) error {
|
||||
out.Resource = in.Resource
|
||||
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
|
||||
out.Scope = v2beta1.ResourceScope(in.Scope)
|
||||
out.SingularResource = in.SingularResource
|
||||
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
|
||||
out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames))
|
||||
out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories))
|
||||
out.Subresources = *(*[]v2beta1.APISubresourceDiscovery)(unsafe.Pointer(&in.Subresources))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery is an autogenerated conversion function.
|
||||
func Convert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(in *apidiscovery.APIResourceDiscovery, out *v2beta1.APIResourceDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_apidiscovery_APIResourceDiscovery_To_v2beta1_APIResourceDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(in *v2beta1.APISubresourceDiscovery, out *apidiscovery.APISubresourceDiscovery, s conversion.Scope) error {
|
||||
out.Subresource = in.Subresource
|
||||
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
|
||||
out.AcceptedTypes = *(*[]v1.GroupVersionKind)(unsafe.Pointer(&in.AcceptedTypes))
|
||||
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery is an autogenerated conversion function.
|
||||
func Convert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(in *v2beta1.APISubresourceDiscovery, out *apidiscovery.APISubresourceDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_v2beta1_APISubresourceDiscovery_To_apidiscovery_APISubresourceDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(in *apidiscovery.APISubresourceDiscovery, out *v2beta1.APISubresourceDiscovery, s conversion.Scope) error {
|
||||
out.Subresource = in.Subresource
|
||||
out.ResponseKind = (*v1.GroupVersionKind)(unsafe.Pointer(in.ResponseKind))
|
||||
out.AcceptedTypes = *(*[]v1.GroupVersionKind)(unsafe.Pointer(&in.AcceptedTypes))
|
||||
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery is an autogenerated conversion function.
|
||||
func Convert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(in *apidiscovery.APISubresourceDiscovery, out *v2beta1.APISubresourceDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_apidiscovery_APISubresourceDiscovery_To_v2beta1_APISubresourceDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(in *v2beta1.APIVersionDiscovery, out *apidiscovery.APIVersionDiscovery, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.Resources = *(*[]apidiscovery.APIResourceDiscovery)(unsafe.Pointer(&in.Resources))
|
||||
out.Freshness = apidiscovery.DiscoveryFreshness(in.Freshness)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery is an autogenerated conversion function.
|
||||
func Convert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(in *v2beta1.APIVersionDiscovery, out *apidiscovery.APIVersionDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_v2beta1_APIVersionDiscovery_To_apidiscovery_APIVersionDiscovery(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(in *apidiscovery.APIVersionDiscovery, out *v2beta1.APIVersionDiscovery, s conversion.Scope) error {
|
||||
out.Version = in.Version
|
||||
out.Resources = *(*[]v2beta1.APIResourceDiscovery)(unsafe.Pointer(&in.Resources))
|
||||
out.Freshness = v2beta1.DiscoveryFreshness(in.Freshness)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery is an autogenerated conversion function.
|
||||
func Convert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(in *apidiscovery.APIVersionDiscovery, out *v2beta1.APIVersionDiscovery, s conversion.Scope) error {
|
||||
return autoConvert_apidiscovery_APIVersionDiscovery_To_v2beta1_APIVersionDiscovery(in, out, s)
|
||||
}
|
33
pkg/apis/apidiscovery/v2beta1/zz_generated.defaults.go
generated
Normal file
33
pkg/apis/apidiscovery/v2beta1/zz_generated.defaults.go
generated
Normal file
@@ -0,0 +1,33 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// RegisterDefaults adds defaulters functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
// All generated defaulters are covering - they call all nested defaulters.
|
||||
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
return nil
|
||||
}
|
190
pkg/apis/apidiscovery/zz_generated.deepcopy.go
generated
Normal file
190
pkg/apis/apidiscovery/zz_generated.deepcopy.go
generated
Normal file
@@ -0,0 +1,190 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package apidiscovery
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APIGroupDiscovery) DeepCopyInto(out *APIGroupDiscovery) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Versions != nil {
|
||||
in, out := &in.Versions, &out.Versions
|
||||
*out = make([]APIVersionDiscovery, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscovery.
|
||||
func (in *APIGroupDiscovery) DeepCopy() *APIGroupDiscovery {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APIGroupDiscovery)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *APIGroupDiscovery) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APIGroupDiscoveryList) DeepCopyInto(out *APIGroupDiscoveryList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]APIGroupDiscovery, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscoveryList.
|
||||
func (in *APIGroupDiscoveryList) DeepCopy() *APIGroupDiscoveryList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APIGroupDiscoveryList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *APIGroupDiscoveryList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APIResourceDiscovery) DeepCopyInto(out *APIResourceDiscovery) {
|
||||
*out = *in
|
||||
if in.ResponseKind != nil {
|
||||
in, out := &in.ResponseKind, &out.ResponseKind
|
||||
*out = new(v1.GroupVersionKind)
|
||||
**out = **in
|
||||
}
|
||||
if in.Verbs != nil {
|
||||
in, out := &in.Verbs, &out.Verbs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ShortNames != nil {
|
||||
in, out := &in.ShortNames, &out.ShortNames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Categories != nil {
|
||||
in, out := &in.Categories, &out.Categories
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Subresources != nil {
|
||||
in, out := &in.Subresources, &out.Subresources
|
||||
*out = make([]APISubresourceDiscovery, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceDiscovery.
|
||||
func (in *APIResourceDiscovery) DeepCopy() *APIResourceDiscovery {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APIResourceDiscovery)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APISubresourceDiscovery) DeepCopyInto(out *APISubresourceDiscovery) {
|
||||
*out = *in
|
||||
if in.ResponseKind != nil {
|
||||
in, out := &in.ResponseKind, &out.ResponseKind
|
||||
*out = new(v1.GroupVersionKind)
|
||||
**out = **in
|
||||
}
|
||||
if in.AcceptedTypes != nil {
|
||||
in, out := &in.AcceptedTypes, &out.AcceptedTypes
|
||||
*out = make([]v1.GroupVersionKind, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Verbs != nil {
|
||||
in, out := &in.Verbs, &out.Verbs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APISubresourceDiscovery.
|
||||
func (in *APISubresourceDiscovery) DeepCopy() *APISubresourceDiscovery {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APISubresourceDiscovery)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *APIVersionDiscovery) DeepCopyInto(out *APIVersionDiscovery) {
|
||||
*out = *in
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]APIResourceDiscovery, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersionDiscovery.
|
||||
func (in *APIVersionDiscovery) DeepCopy() *APIVersionDiscovery {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(APIVersionDiscovery)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
Reference in New Issue
Block a user