Update ingress godeps

This commit is contained in:
Manuel de Brito Fontes 2016-08-10 14:53:55 -04:00
parent d43021b3f1
commit 28db8fb16d
1068 changed files with 461467 additions and 117300 deletions

View file

@ -1,288 +0,0 @@
// +build !ignore_autogenerated
/*
Copyright 2016 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package unversioned
import (
conversion "k8s.io/kubernetes/pkg/conversion"
time "time"
)
func DeepCopy_unversioned_APIGroup(in APIGroup, out *APIGroup, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
out.Name = in.Name
if in.Versions != nil {
in, out := in.Versions, &out.Versions
*out = make([]GroupVersionForDiscovery, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.Versions = nil
}
out.PreferredVersion = in.PreferredVersion
if in.ServerAddressByClientCIDRs != nil {
in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.ServerAddressByClientCIDRs = nil
}
return nil
}
func DeepCopy_unversioned_APIGroupList(in APIGroupList, out *APIGroupList, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if in.Groups != nil {
in, out := in.Groups, &out.Groups
*out = make([]APIGroup, len(in))
for i := range in {
if err := DeepCopy_unversioned_APIGroup(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Groups = nil
}
return nil
}
func DeepCopy_unversioned_APIResource(in APIResource, out *APIResource, c *conversion.Cloner) error {
out.Name = in.Name
out.Namespaced = in.Namespaced
out.Kind = in.Kind
return nil
}
func DeepCopy_unversioned_APIResourceList(in APIResourceList, out *APIResourceList, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
out.GroupVersion = in.GroupVersion
if in.APIResources != nil {
in, out := in.APIResources, &out.APIResources
*out = make([]APIResource, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.APIResources = nil
}
return nil
}
func DeepCopy_unversioned_APIVersions(in APIVersions, out *APIVersions, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
if in.Versions != nil {
in, out := in.Versions, &out.Versions
*out = make([]string, len(in))
copy(*out, in)
} else {
out.Versions = nil
}
if in.ServerAddressByClientCIDRs != nil {
in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.ServerAddressByClientCIDRs = nil
}
return nil
}
func DeepCopy_unversioned_Duration(in Duration, out *Duration, c *conversion.Cloner) error {
out.Duration = in.Duration
return nil
}
func DeepCopy_unversioned_ExportOptions(in ExportOptions, out *ExportOptions, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
out.Export = in.Export
out.Exact = in.Exact
return nil
}
func DeepCopy_unversioned_GroupKind(in GroupKind, out *GroupKind, c *conversion.Cloner) error {
out.Group = in.Group
out.Kind = in.Kind
return nil
}
func DeepCopy_unversioned_GroupResource(in GroupResource, out *GroupResource, c *conversion.Cloner) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
func DeepCopy_unversioned_GroupVersion(in GroupVersion, out *GroupVersion, c *conversion.Cloner) error {
out.Group = in.Group
out.Version = in.Version
return nil
}
func DeepCopy_unversioned_GroupVersionForDiscovery(in GroupVersionForDiscovery, out *GroupVersionForDiscovery, c *conversion.Cloner) error {
out.GroupVersion = in.GroupVersion
out.Version = in.Version
return nil
}
func DeepCopy_unversioned_GroupVersionKind(in GroupVersionKind, out *GroupVersionKind, c *conversion.Cloner) error {
out.Group = in.Group
out.Version = in.Version
out.Kind = in.Kind
return nil
}
func DeepCopy_unversioned_GroupVersionResource(in GroupVersionResource, out *GroupVersionResource, c *conversion.Cloner) error {
out.Group = in.Group
out.Version = in.Version
out.Resource = in.Resource
return nil
}
func DeepCopy_unversioned_LabelSelector(in LabelSelector, out *LabelSelector, c *conversion.Cloner) error {
if in.MatchLabels != nil {
in, out := in.MatchLabels, &out.MatchLabels
*out = make(map[string]string)
for key, val := range in {
(*out)[key] = val
}
} else {
out.MatchLabels = nil
}
if in.MatchExpressions != nil {
in, out := in.MatchExpressions, &out.MatchExpressions
*out = make([]LabelSelectorRequirement, len(in))
for i := range in {
if err := DeepCopy_unversioned_LabelSelectorRequirement(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.MatchExpressions = nil
}
return nil
}
func DeepCopy_unversioned_LabelSelectorRequirement(in LabelSelectorRequirement, out *LabelSelectorRequirement, c *conversion.Cloner) error {
out.Key = in.Key
out.Operator = in.Operator
if in.Values != nil {
in, out := in.Values, &out.Values
*out = make([]string, len(in))
copy(*out, in)
} else {
out.Values = nil
}
return nil
}
func DeepCopy_unversioned_ListMeta(in ListMeta, out *ListMeta, c *conversion.Cloner) error {
out.SelfLink = in.SelfLink
out.ResourceVersion = in.ResourceVersion
return nil
}
func DeepCopy_unversioned_Patch(in Patch, out *Patch, c *conversion.Cloner) error {
return nil
}
func DeepCopy_unversioned_RootPaths(in RootPaths, out *RootPaths, c *conversion.Cloner) error {
if in.Paths != nil {
in, out := in.Paths, &out.Paths
*out = make([]string, len(in))
copy(*out, in)
} else {
out.Paths = nil
}
return nil
}
func DeepCopy_unversioned_ServerAddressByClientCIDR(in ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, c *conversion.Cloner) error {
out.ClientCIDR = in.ClientCIDR
out.ServerAddress = in.ServerAddress
return nil
}
func DeepCopy_unversioned_Status(in Status, out *Status, c *conversion.Cloner) error {
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
out.Status = in.Status
out.Message = in.Message
out.Reason = in.Reason
if in.Details != nil {
in, out := in.Details, &out.Details
*out = new(StatusDetails)
if err := DeepCopy_unversioned_StatusDetails(*in, *out, c); err != nil {
return err
}
} else {
out.Details = nil
}
out.Code = in.Code
return nil
}
func DeepCopy_unversioned_StatusCause(in StatusCause, out *StatusCause, c *conversion.Cloner) error {
out.Type = in.Type
out.Message = in.Message
out.Field = in.Field
return nil
}
func DeepCopy_unversioned_StatusDetails(in StatusDetails, out *StatusDetails, c *conversion.Cloner) error {
out.Name = in.Name
out.Group = in.Group
out.Kind = in.Kind
if in.Causes != nil {
in, out := in.Causes, &out.Causes
*out = make([]StatusCause, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.Causes = nil
}
out.RetryAfterSeconds = in.RetryAfterSeconds
return nil
}
func DeepCopy_unversioned_Time(in Time, out *Time, c *conversion.Cloner) error {
if newVal, err := c.DeepCopy(in.Time); err != nil {
return err
} else {
out.Time = newVal.(time.Time)
}
return nil
}
func DeepCopy_unversioned_Timestamp(in Timestamp, out *Timestamp, c *conversion.Cloner) error {
out.Seconds = in.Seconds
out.Nanos = in.Nanos
return nil
}
func DeepCopy_unversioned_TypeMeta(in TypeMeta, out *TypeMeta, c *conversion.Cloner) error {
out.Kind = in.Kind
out.APIVersion = in.APIVersion
return nil
}

View file

@ -58,6 +58,10 @@ import math "math"
import time "time"
import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
@ -65,95 +69,111 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (m *APIGroup) Reset() { *m = APIGroup{} }
func (m *APIGroup) String() string { return proto.CompactTextString(m) }
func (*APIGroup) ProtoMessage() {}
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *APIGroupList) Reset() { *m = APIGroupList{} }
func (m *APIGroupList) String() string { return proto.CompactTextString(m) }
func (*APIGroupList) ProtoMessage() {}
func (m *APIGroup) Reset() { *m = APIGroup{} }
func (*APIGroup) ProtoMessage() {}
func (*APIGroup) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *APIResource) Reset() { *m = APIResource{} }
func (m *APIResource) String() string { return proto.CompactTextString(m) }
func (*APIResource) ProtoMessage() {}
func (m *APIGroupList) Reset() { *m = APIGroupList{} }
func (*APIGroupList) ProtoMessage() {}
func (*APIGroupList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *APIResourceList) Reset() { *m = APIResourceList{} }
func (m *APIResourceList) String() string { return proto.CompactTextString(m) }
func (*APIResourceList) ProtoMessage() {}
func (m *APIResource) Reset() { *m = APIResource{} }
func (*APIResource) ProtoMessage() {}
func (*APIResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *APIVersions) Reset() { *m = APIVersions{} }
func (*APIVersions) ProtoMessage() {}
func (m *APIResourceList) Reset() { *m = APIResourceList{} }
func (*APIResourceList) ProtoMessage() {}
func (*APIResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *Duration) Reset() { *m = Duration{} }
func (m *Duration) String() string { return proto.CompactTextString(m) }
func (*Duration) ProtoMessage() {}
func (m *APIVersions) Reset() { *m = APIVersions{} }
func (*APIVersions) ProtoMessage() {}
func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func (m *ExportOptions) Reset() { *m = ExportOptions{} }
func (m *ExportOptions) String() string { return proto.CompactTextString(m) }
func (*ExportOptions) ProtoMessage() {}
func (m *Duration) Reset() { *m = Duration{} }
func (*Duration) ProtoMessage() {}
func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
func (m *GroupKind) Reset() { *m = GroupKind{} }
func (*GroupKind) ProtoMessage() {}
func (m *ExportOptions) Reset() { *m = ExportOptions{} }
func (*ExportOptions) ProtoMessage() {}
func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *GroupResource) Reset() { *m = GroupResource{} }
func (*GroupResource) ProtoMessage() {}
func (m *GroupKind) Reset() { *m = GroupKind{} }
func (*GroupKind) ProtoMessage() {}
func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func (m *GroupVersion) Reset() { *m = GroupVersion{} }
func (*GroupVersion) ProtoMessage() {}
func (m *GroupResource) Reset() { *m = GroupResource{} }
func (*GroupResource) ProtoMessage() {}
func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} }
func (m *GroupVersionForDiscovery) String() string { return proto.CompactTextString(m) }
func (*GroupVersionForDiscovery) ProtoMessage() {}
func (m *GroupVersion) Reset() { *m = GroupVersion{} }
func (*GroupVersion) ProtoMessage() {}
func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} }
func (*GroupVersionKind) ProtoMessage() {}
func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} }
func (*GroupVersionForDiscovery) ProtoMessage() {}
func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{10}
}
func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} }
func (*GroupVersionResource) ProtoMessage() {}
func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} }
func (*GroupVersionKind) ProtoMessage() {}
func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
func (m *LabelSelector) Reset() { *m = LabelSelector{} }
func (m *LabelSelector) String() string { return proto.CompactTextString(m) }
func (*LabelSelector) ProtoMessage() {}
func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} }
func (*GroupVersionResource) ProtoMessage() {}
func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
func (m *LabelSelectorRequirement) String() string { return proto.CompactTextString(m) }
func (*LabelSelectorRequirement) ProtoMessage() {}
func (m *LabelSelector) Reset() { *m = LabelSelector{} }
func (*LabelSelector) ProtoMessage() {}
func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
func (m *ListMeta) Reset() { *m = ListMeta{} }
func (m *ListMeta) String() string { return proto.CompactTextString(m) }
func (*ListMeta) ProtoMessage() {}
func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
func (*LabelSelectorRequirement) ProtoMessage() {}
func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{14}
}
func (m *RootPaths) Reset() { *m = RootPaths{} }
func (m *RootPaths) String() string { return proto.CompactTextString(m) }
func (*RootPaths) ProtoMessage() {}
func (m *ListMeta) Reset() { *m = ListMeta{} }
func (*ListMeta) ProtoMessage() {}
func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
func (m *ServerAddressByClientCIDR) String() string { return proto.CompactTextString(m) }
func (*ServerAddressByClientCIDR) ProtoMessage() {}
func (m *RootPaths) Reset() { *m = RootPaths{} }
func (*RootPaths) ProtoMessage() {}
func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
func (m *Status) Reset() { *m = Status{} }
func (m *Status) String() string { return proto.CompactTextString(m) }
func (*Status) ProtoMessage() {}
func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
func (*ServerAddressByClientCIDR) ProtoMessage() {}
func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{17}
}
func (m *StatusCause) Reset() { *m = StatusCause{} }
func (m *StatusCause) String() string { return proto.CompactTextString(m) }
func (*StatusCause) ProtoMessage() {}
func (m *Status) Reset() { *m = Status{} }
func (*Status) ProtoMessage() {}
func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
func (m *StatusDetails) Reset() { *m = StatusDetails{} }
func (m *StatusDetails) String() string { return proto.CompactTextString(m) }
func (*StatusDetails) ProtoMessage() {}
func (m *StatusCause) Reset() { *m = StatusCause{} }
func (*StatusCause) ProtoMessage() {}
func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
func (m *Time) Reset() { *m = Time{} }
func (m *Time) String() string { return proto.CompactTextString(m) }
func (*Time) ProtoMessage() {}
func (m *StatusDetails) Reset() { *m = StatusDetails{} }
func (*StatusDetails) ProtoMessage() {}
func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
func (m *Timestamp) Reset() { *m = Timestamp{} }
func (m *Timestamp) String() string { return proto.CompactTextString(m) }
func (*Timestamp) ProtoMessage() {}
func (m *Time) Reset() { *m = Time{} }
func (*Time) ProtoMessage() {}
func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
func (m *TypeMeta) Reset() { *m = TypeMeta{} }
func (m *TypeMeta) String() string { return proto.CompactTextString(m) }
func (*TypeMeta) ProtoMessage() {}
func (m *Timestamp) Reset() { *m = Timestamp{} }
func (*Timestamp) ProtoMessage() {}
func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
func (m *TypeMeta) Reset() { *m = TypeMeta{} }
func (*TypeMeta) ProtoMessage() {}
func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
func init() {
proto.RegisterType((*APIGroup)(nil), "k8s.io.kubernetes.pkg.api.unversioned.APIGroup")
@ -1278,6 +1298,220 @@ func sovGenerated(x uint64) (n int) {
func sozGenerated(x uint64) (n int) {
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *APIGroup) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&APIGroup{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`,
`PreferredVersion:` + strings.Replace(strings.Replace(this.PreferredVersion.String(), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`,
`ServerAddressByClientCIDRs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServerAddressByClientCIDRs), "ServerAddressByClientCIDR", "ServerAddressByClientCIDR", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *APIGroupList) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&APIGroupList{`,
`Groups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Groups), "APIGroup", "APIGroup", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *APIResource) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&APIResource{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Namespaced:` + fmt.Sprintf("%v", this.Namespaced) + `,`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
`}`,
}, "")
return s
}
func (this *APIResourceList) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&APIResourceList{`,
`GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`,
`APIResources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.APIResources), "APIResource", "APIResource", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *Duration) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Duration{`,
`Duration:` + fmt.Sprintf("%v", this.Duration) + `,`,
`}`,
}, "")
return s
}
func (this *ExportOptions) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ExportOptions{`,
`Export:` + fmt.Sprintf("%v", this.Export) + `,`,
`Exact:` + fmt.Sprintf("%v", this.Exact) + `,`,
`}`,
}, "")
return s
}
func (this *GroupVersionForDiscovery) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&GroupVersionForDiscovery{`,
`GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`,
`Version:` + fmt.Sprintf("%v", this.Version) + `,`,
`}`,
}, "")
return s
}
func (this *LabelSelector) String() string {
if this == nil {
return "nil"
}
keysForMatchLabels := make([]string, 0, len(this.MatchLabels))
for k := range this.MatchLabels {
keysForMatchLabels = append(keysForMatchLabels, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels)
mapStringForMatchLabels := "map[string]string{"
for _, k := range keysForMatchLabels {
mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k])
}
mapStringForMatchLabels += "}"
s := strings.Join([]string{`&LabelSelector{`,
`MatchLabels:` + mapStringForMatchLabels + `,`,
`MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *LabelSelectorRequirement) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&LabelSelectorRequirement{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
`Values:` + fmt.Sprintf("%v", this.Values) + `,`,
`}`,
}, "")
return s
}
func (this *ListMeta) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ListMeta{`,
`SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`,
`ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
`}`,
}, "")
return s
}
func (this *RootPaths) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RootPaths{`,
`Paths:` + fmt.Sprintf("%v", this.Paths) + `,`,
`}`,
}, "")
return s
}
func (this *ServerAddressByClientCIDR) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ServerAddressByClientCIDR{`,
`ClientCIDR:` + fmt.Sprintf("%v", this.ClientCIDR) + `,`,
`ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`,
`}`,
}, "")
return s
}
func (this *Status) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Status{`,
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "ListMeta", 1), `&`, ``, 1) + `,`,
`Status:` + fmt.Sprintf("%v", this.Status) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
`Details:` + strings.Replace(fmt.Sprintf("%v", this.Details), "StatusDetails", "StatusDetails", 1) + `,`,
`Code:` + fmt.Sprintf("%v", this.Code) + `,`,
`}`,
}, "")
return s
}
func (this *StatusCause) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&StatusCause{`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`Field:` + fmt.Sprintf("%v", this.Field) + `,`,
`}`,
}, "")
return s
}
func (this *StatusDetails) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&StatusDetails{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Group:` + fmt.Sprintf("%v", this.Group) + `,`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
`Causes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Causes), "StatusCause", "StatusCause", 1), `&`, ``, 1) + `,`,
`RetryAfterSeconds:` + fmt.Sprintf("%v", this.RetryAfterSeconds) + `,`,
`}`,
}, "")
return s
}
func (this *Timestamp) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Timestamp{`,
`Seconds:` + fmt.Sprintf("%v", this.Seconds) + `,`,
`Nanos:` + fmt.Sprintf("%v", this.Nanos) + `,`,
`}`,
}, "")
return s
}
func (this *TypeMeta) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&TypeMeta{`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
`APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
`}`,
}, "")
return s
}
func valueToStringGenerated(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *APIGroup) Unmarshal(data []byte) error {
l := len(data)
iNdEx := 0
@ -4210,3 +4444,93 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
)
var fileDescriptorGenerated = []byte{
// 1376 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
0x14, 0xf7, 0x47, 0xec, 0xae, 0x9f, 0x63, 0x92, 0x0e, 0xa9, 0x70, 0x2d, 0x11, 0x87, 0x45, 0xa0,
0x54, 0x6a, 0x6d, 0x35, 0x02, 0x54, 0x15, 0xf1, 0x11, 0x27, 0x69, 0x15, 0x35, 0x49, 0xa3, 0x49,
0x15, 0xa4, 0x16, 0x24, 0x36, 0xde, 0xb1, 0xb3, 0xb2, 0xbd, 0xbb, 0xec, 0xec, 0x56, 0x8d, 0x40,
0xa2, 0x17, 0x24, 0x0e, 0x08, 0xe5, 0xc8, 0x05, 0xd4, 0x4a, 0xfc, 0x07, 0xfc, 0x13, 0x11, 0xa7,
0x5e, 0x90, 0x38, 0xa0, 0x08, 0xca, 0x85, 0x2b, 0x57, 0x4e, 0xcc, 0xcc, 0xce, 0xec, 0x87, 0x53,
0x93, 0x0d, 0xf4, 0xc0, 0x61, 0x15, 0xcf, 0xfb, 0x9e, 0xf7, 0x7e, 0xf3, 0xde, 0x0b, 0xbc, 0x39,
0xb8, 0x46, 0x5b, 0x96, 0xd3, 0x1e, 0x04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x9f, 0x78, 0x3b, 0xa4, 0xeb, 0xd8, 0x66,
0x58, 0xf2, 0x52, 0x94, 0xe4, 0xf3, 0x78, 0x5c, 0x00, 0x9f, 0xd4, 0x61, 0xab, 0xce, 0xd4, 0x1d,
0xb6, 0xc1, 0xf1, 0xbc, 0x53, 0x69, 0x26, 0x5c, 0xf6, 0xa2, 0xbc, 0x2b, 0x65, 0xc5, 0xe7, 0xe9,
0xb1, 0x0d, 0xdb, 0x09, 0xe1, 0x5e, 0x8a, 0xd3, 0xb3, 0xc5, 0x89, 0x38, 0xe4, 0x5d, 0x9f, 0xe3,
0x13, 0xec, 0xcb, 0xc7, 0xcd, 0xdc, 0x21, 0xfb, 0x1e, 0x3d, 0x96, 0xd3, 0xec, 0x1e, 0x54, 0xb8,
0x37, 0xf6, 0x20, 0x46, 0xee, 0xf3, 0x76, 0xa9, 0x7f, 0x0c, 0x1a, 0x87, 0x92, 0xe8, 0x95, 0xaa,
0x3a, 0xf9, 0x89, 0xd5, 0x61, 0x0d, 0x89, 0x25, 0x3e, 0xdd, 0x1a, 0xa3, 0x86, 0x14, 0xaf, 0xfb,
0x38, 0x21, 0xd5, 0xb9, 0x72, 0xf4, 0xdb, 0x7c, 0xee, 0x09, 0xfb, 0x7e, 0x66, 0xdf, 0xc3, 0xa7,
0xf3, 0xf9, 0x23, 0xf6, 0x3d, 0x61, 0xdf, 0xaf, 0xec, 0x3b, 0xfc, 0x7d, 0x3e, 0x77, 0xb7, 0x9a,
0x28, 0xe4, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x22, 0x00, 0xde, 0x9c, 0x10, 0x00, 0x00,
}

View file

@ -144,7 +144,7 @@ message GroupVersion {
}
// GroupVersion contains the "group/version" and "version" string of a version.
// It is made a struct to keep extensiblity.
// It is made a struct to keep extensibility.
message GroupVersionForDiscovery {
// groupVersion specifies the API group and version in the form "group/version"
optional string groupVersion = 1;
@ -328,6 +328,7 @@ message StatusDetails {
//
// +protobuf.options.marshal=false
// +protobuf.as=Timestamp
// +protobuf.options.(gogoproto.goproto_stringer)=false
message Time {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to

View file

@ -50,7 +50,7 @@ func (gr GroupResource) WithVersion(version string) GroupVersionResource {
return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
}
func (gr GroupResource) IsEmpty() bool {
func (gr GroupResource) Empty() bool {
return len(gr.Group) == 0 && len(gr.Resource) == 0
}
@ -81,7 +81,7 @@ type GroupVersionResource struct {
Resource string `protobuf:"bytes,3,opt,name=resource"`
}
func (gvr GroupVersionResource) IsEmpty() bool {
func (gvr GroupVersionResource) Empty() bool {
return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0
}
@ -106,7 +106,7 @@ type GroupKind struct {
Kind string `protobuf:"bytes,2,opt,name=kind"`
}
func (gk GroupKind) IsEmpty() bool {
func (gk GroupKind) Empty() bool {
return len(gk.Group) == 0 && len(gk.Kind) == 0
}
@ -131,8 +131,8 @@ type GroupVersionKind struct {
Kind string `protobuf:"bytes,3,opt,name=kind"`
}
// IsEmpty returns true if group, version, and kind are empty
func (gvk GroupVersionKind) IsEmpty() bool {
// Empty returns true if group, version, and kind are empty
func (gvk GroupVersionKind) Empty() bool {
return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0
}
@ -156,8 +156,8 @@ type GroupVersion struct {
Version string `protobuf:"bytes,2,opt,name=version"`
}
// IsEmpty returns true if group and version are empty
func (gv GroupVersion) IsEmpty() bool {
// Empty returns true if group and version are empty
func (gv GroupVersion) Empty() bool {
return len(gv.Group) == 0 && len(gv.Version) == 0
}
@ -165,7 +165,7 @@ func (gv GroupVersion) IsEmpty() bool {
// it returns "v1".
func (gv GroupVersion) String() string {
// special case the internal apiVersion for the legacy kube types
if gv.IsEmpty() {
if gv.Empty() {
return ""
}
@ -179,6 +179,25 @@ func (gv GroupVersion) String() string {
return gv.Version
}
// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
// if none of the options match the group. It prefers a match to group and version over just group.
// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme.
// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
// in fewer places.
func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
for _, gvk := range kinds {
if gvk.Group == gv.Group && gvk.Version == gv.Version {
return gvk, true
}
}
for _, gvk := range kinds {
if gvk.Group == gv.Group {
return gv.WithKind(gvk.Kind), true
}
}
return GroupVersionKind{}, false
}
// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error
// if it cannot parse the string.
func ParseGroupVersion(gv string) (GroupVersion, error) {
@ -241,6 +260,25 @@ func (gv *GroupVersion) UnmarshalText(value []byte) error {
return gv.unmarshal(value)
}
// GroupVersions can be used to represent a set of desired group versions.
// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme.
// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
// in fewer places.
type GroupVersions []GroupVersion
// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
// if none of the options match the group.
func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
for _, gv := range gvs {
target, ok := gv.KindForGroupVersionKinds(kinds)
if !ok {
continue
}
return target, true
}
return GroupVersionKind{}, false
}
// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that
// do not use TypeMeta.
func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) {

View file

@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/selection"
"k8s.io/kubernetes/pkg/util/sets"
)
@ -35,23 +36,23 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) {
}
selector := labels.NewSelector()
for k, v := range ps.MatchLabels {
r, err := labels.NewRequirement(k, labels.EqualsOperator, sets.NewString(v))
r, err := labels.NewRequirement(k, selection.Equals, sets.NewString(v))
if err != nil {
return nil, err
}
selector = selector.Add(*r)
}
for _, expr := range ps.MatchExpressions {
var op labels.Operator
var op selection.Operator
switch expr.Operator {
case LabelSelectorOpIn:
op = labels.InOperator
op = selection.In
case LabelSelectorOpNotIn:
op = labels.NotInOperator
op = selection.NotIn
case LabelSelectorOpExists:
op = labels.ExistsOperator
op = selection.Exists
case LabelSelectorOpDoesNotExist:
op = labels.DoesNotExistOperator
op = selection.DoesNotExist
default:
return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
}
@ -64,6 +65,35 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) {
return selector, nil
}
// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the
// original structure of a label selector. Operators that cannot be converted into plain
// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in
// an error.
func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) {
if ps == nil {
return nil, nil
}
selector := map[string]string{}
for k, v := range ps.MatchLabels {
selector[k] = v
}
for _, expr := range ps.MatchExpressions {
switch expr.Operator {
case LabelSelectorOpIn:
if len(expr.Values) != 1 {
return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator)
}
// Should we do anything in case this will override a previous key-value pair?
selector[expr.Key] = expr.Values[0]
case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist:
return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator)
default:
return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator)
}
}
return selector, nil
}
// ParseToLabelSelector parses a string representing a selector into a LabelSelector object.
// Note: This function should be kept in sync with the parser in pkg/labels/selector.go
func ParseToLabelSelector(selector string) (*LabelSelector, error) {
@ -79,7 +109,7 @@ func ParseToLabelSelector(selector string) (*LabelSelector, error) {
for _, req := range reqs {
var op LabelSelectorOperator
switch req.Operator() {
case labels.EqualsOperator, labels.DoubleEqualsOperator:
case selection.Equals, selection.DoubleEquals:
vals := req.Values()
if vals.Len() != 1 {
return nil, fmt.Errorf("equals operator must have exactly one value")
@ -90,15 +120,15 @@ func ParseToLabelSelector(selector string) (*LabelSelector, error) {
}
labelSelector.MatchLabels[req.Key()] = val
continue
case labels.InOperator:
case selection.In:
op = LabelSelectorOpIn
case labels.NotInOperator:
case selection.NotIn:
op = LabelSelectorOpNotIn
case labels.ExistsOperator:
case selection.Exists:
op = LabelSelectorOpExists
case labels.DoesNotExistOperator:
case selection.DoesNotExist:
op = LabelSelectorOpDoesNotExist
case labels.GreaterThanOperator, labels.LessThanOperator:
case selection.GreaterThan, selection.LessThan:
// Adding a separate case for these operators to indicate that this is deliberate
return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator())
default:

View file

@ -29,6 +29,7 @@ import (
//
// +protobuf.options.marshal=false
// +protobuf.as=Timestamp
// +protobuf.options.(gogoproto.goproto_stringer)=false
type Time struct {
time.Time `protobuf:"-"`
}
@ -40,6 +41,11 @@ func (t Time) DeepCopy() Time {
return t
}
// String returns the representation of the time.
func (t Time) String() string {
return t.Time.String()
}
// NewTime returns a wrapped instance of the provided time
func NewTime(time time.Time) Time {
return Time{time}

View file

@ -357,7 +357,7 @@ type ServerAddressByClientCIDR struct {
}
// GroupVersion contains the "group/version" and "version" string of a version.
// It is made a struct to keep extensiblity.
// It is made a struct to keep extensibility.
type GroupVersionForDiscovery struct {
// groupVersion specifies the API group and version in the form "group/version"
GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"`

View file

@ -90,7 +90,7 @@ func (ExportOptions) SwaggerDoc() map[string]string {
}
var map_GroupVersionForDiscovery = map[string]string{
"": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensiblity.",
"": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.",
"groupVersion": "groupVersion specifies the API group and version in the form \"group/version\"",
"version": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.",
}

View file

@ -0,0 +1,390 @@
// +build !ignore_autogenerated
/*
Copyright 2016 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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package unversioned
import (
conversion "k8s.io/kubernetes/pkg/conversion"
time "time"
)
func DeepCopy_unversioned_APIGroup(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIGroup)
out := out.(*APIGroup)
out.TypeMeta = in.TypeMeta
out.Name = in.Name
if in.Versions != nil {
in, out := &in.Versions, &out.Versions
*out = make([]GroupVersionForDiscovery, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
} else {
out.Versions = nil
}
out.PreferredVersion = in.PreferredVersion
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
} else {
out.ServerAddressByClientCIDRs = nil
}
return nil
}
}
func DeepCopy_unversioned_APIGroupList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIGroupList)
out := out.(*APIGroupList)
out.TypeMeta = in.TypeMeta
if in.Groups != nil {
in, out := &in.Groups, &out.Groups
*out = make([]APIGroup, len(*in))
for i := range *in {
if err := DeepCopy_unversioned_APIGroup(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Groups = nil
}
return nil
}
}
func DeepCopy_unversioned_APIResource(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIResource)
out := out.(*APIResource)
out.Name = in.Name
out.Namespaced = in.Namespaced
out.Kind = in.Kind
return nil
}
}
func DeepCopy_unversioned_APIResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIResourceList)
out := out.(*APIResourceList)
out.TypeMeta = in.TypeMeta
out.GroupVersion = in.GroupVersion
if in.APIResources != nil {
in, out := &in.APIResources, &out.APIResources
*out = make([]APIResource, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
} else {
out.APIResources = nil
}
return nil
}
}
func DeepCopy_unversioned_APIVersions(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIVersions)
out := out.(*APIVersions)
out.TypeMeta = in.TypeMeta
if in.Versions != nil {
in, out := &in.Versions, &out.Versions
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Versions = nil
}
if in.ServerAddressByClientCIDRs != nil {
in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
*out = make([]ServerAddressByClientCIDR, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
} else {
out.ServerAddressByClientCIDRs = nil
}
return nil
}
}
func DeepCopy_unversioned_Duration(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Duration)
out := out.(*Duration)
out.Duration = in.Duration
return nil
}
}
func DeepCopy_unversioned_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ExportOptions)
out := out.(*ExportOptions)
out.TypeMeta = in.TypeMeta
out.Export = in.Export
out.Exact = in.Exact
return nil
}
}
func DeepCopy_unversioned_GroupKind(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*GroupKind)
out := out.(*GroupKind)
out.Group = in.Group
out.Kind = in.Kind
return nil
}
}
func DeepCopy_unversioned_GroupResource(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*GroupResource)
out := out.(*GroupResource)
out.Group = in.Group
out.Resource = in.Resource
return nil
}
}
func DeepCopy_unversioned_GroupVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*GroupVersion)
out := out.(*GroupVersion)
out.Group = in.Group
out.Version = in.Version
return nil
}
}
func DeepCopy_unversioned_GroupVersionForDiscovery(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*GroupVersionForDiscovery)
out := out.(*GroupVersionForDiscovery)
out.GroupVersion = in.GroupVersion
out.Version = in.Version
return nil
}
}
func DeepCopy_unversioned_GroupVersionKind(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*GroupVersionKind)
out := out.(*GroupVersionKind)
out.Group = in.Group
out.Version = in.Version
out.Kind = in.Kind
return nil
}
}
func DeepCopy_unversioned_GroupVersionResource(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*GroupVersionResource)
out := out.(*GroupVersionResource)
out.Group = in.Group
out.Version = in.Version
out.Resource = in.Resource
return nil
}
}
func DeepCopy_unversioned_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*LabelSelector)
out := out.(*LabelSelector)
if in.MatchLabels != nil {
in, out := &in.MatchLabels, &out.MatchLabels
*out = make(map[string]string)
for key, val := range *in {
(*out)[key] = val
}
} else {
out.MatchLabels = nil
}
if in.MatchExpressions != nil {
in, out := &in.MatchExpressions, &out.MatchExpressions
*out = make([]LabelSelectorRequirement, len(*in))
for i := range *in {
if err := DeepCopy_unversioned_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.MatchExpressions = nil
}
return nil
}
}
func DeepCopy_unversioned_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*LabelSelectorRequirement)
out := out.(*LabelSelectorRequirement)
out.Key = in.Key
out.Operator = in.Operator
if in.Values != nil {
in, out := &in.Values, &out.Values
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Values = nil
}
return nil
}
}
func DeepCopy_unversioned_ListMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ListMeta)
out := out.(*ListMeta)
out.SelfLink = in.SelfLink
out.ResourceVersion = in.ResourceVersion
return nil
}
}
func DeepCopy_unversioned_Patch(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Patch)
out := out.(*Patch)
_ = in
_ = out
return nil
}
}
func DeepCopy_unversioned_RootPaths(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*RootPaths)
out := out.(*RootPaths)
if in.Paths != nil {
in, out := &in.Paths, &out.Paths
*out = make([]string, len(*in))
copy(*out, *in)
} else {
out.Paths = nil
}
return nil
}
}
func DeepCopy_unversioned_ServerAddressByClientCIDR(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ServerAddressByClientCIDR)
out := out.(*ServerAddressByClientCIDR)
out.ClientCIDR = in.ClientCIDR
out.ServerAddress = in.ServerAddress
return nil
}
}
func DeepCopy_unversioned_Status(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Status)
out := out.(*Status)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
out.Status = in.Status
out.Message = in.Message
out.Reason = in.Reason
if in.Details != nil {
in, out := &in.Details, &out.Details
*out = new(StatusDetails)
if err := DeepCopy_unversioned_StatusDetails(*in, *out, c); err != nil {
return err
}
} else {
out.Details = nil
}
out.Code = in.Code
return nil
}
}
func DeepCopy_unversioned_StatusCause(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatusCause)
out := out.(*StatusCause)
out.Type = in.Type
out.Message = in.Message
out.Field = in.Field
return nil
}
}
func DeepCopy_unversioned_StatusDetails(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*StatusDetails)
out := out.(*StatusDetails)
out.Name = in.Name
out.Group = in.Group
out.Kind = in.Kind
if in.Causes != nil {
in, out := &in.Causes, &out.Causes
*out = make([]StatusCause, len(*in))
for i := range *in {
(*out)[i] = (*in)[i]
}
} else {
out.Causes = nil
}
out.RetryAfterSeconds = in.RetryAfterSeconds
return nil
}
}
func DeepCopy_unversioned_Time(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Time)
out := out.(*Time)
if newVal, err := c.DeepCopy(&in.Time); err != nil {
return err
} else {
out.Time = *newVal.(*time.Time)
}
return nil
}
}
func DeepCopy_unversioned_Timestamp(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*Timestamp)
out := out.(*Timestamp)
out.Seconds = in.Seconds
out.Nanos = in.Nanos
return nil
}
}
func DeepCopy_unversioned_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*TypeMeta)
out := out.(*TypeMeta)
out.Kind = in.Kind
out.APIVersion = in.APIVersion
return nil
}
}