Add generated file
This PR adds generated files under pkg/client and vendor folder.
This commit is contained in:
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/doc.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2018 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:defaulter-gen=covers
|
||||
|
||||
// This is a test package.
|
||||
package empty // import "k8s.io/gengo/examples/defaulter-gen/_output_tests/empty"
|
29
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/type.go
generated
vendored
Normal file
29
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/type.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright 2018 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 empty
|
||||
|
||||
// Only test
|
||||
type Ttest struct {
|
||||
BoolField bool
|
||||
IntField int
|
||||
StringField string
|
||||
FloatField float64
|
||||
}
|
||||
|
||||
type TypeMeta struct {
|
||||
Fortest bool
|
||||
}
|
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/zz_generated.go
generated
vendored
Normal file
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/zz_generated.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// +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 empty
|
||||
|
||||
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
|
||||
}
|
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/defaults.go
generated
vendored
Normal file
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/defaults.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2018 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 pointer
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
return RegisterDefaults(scheme)
|
||||
}
|
||||
|
||||
func SetDefaults_Tpointer(obj *Tpointer) {
|
||||
if obj.BoolField == nil {
|
||||
obj.BoolField = new(bool)
|
||||
*obj.BoolField = true
|
||||
}
|
||||
}
|
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/doc.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2018 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:defaulter-gen=TypeMeta
|
||||
|
||||
// This is a test package.
|
||||
package pointer // import "k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer"
|
33
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/type.go
generated
vendored
Normal file
33
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/type.go
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright 2018 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 pointer
|
||||
|
||||
import (
|
||||
"k8s.io/gengo/examples/defaulter-gen/_output_tests/empty"
|
||||
)
|
||||
|
||||
type Tpointer struct {
|
||||
empty.TypeMeta
|
||||
BoolField *bool
|
||||
}
|
||||
|
||||
// Only test
|
||||
type Ttest struct {
|
||||
empty.TypeMeta
|
||||
NTP Tpointer
|
||||
Tp *Tpointer
|
||||
}
|
45
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/zz_generated.go
generated
vendored
Normal file
45
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/zz_generated.go
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// +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 pointer
|
||||
|
||||
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 {
|
||||
scheme.AddTypeDefaultingFunc(&Tpointer{}, func(obj interface{}) { SetObjectDefaults_Tpointer(obj.(*Tpointer)) })
|
||||
scheme.AddTypeDefaultingFunc(&Ttest{}, func(obj interface{}) { SetObjectDefaults_Ttest(obj.(*Ttest)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Tpointer(in *Tpointer) {
|
||||
SetDefaults_Tpointer(in)
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Ttest(in *Ttest) {
|
||||
SetObjectDefaults_Tpointer(&in.NTP)
|
||||
if in.Tp != nil {
|
||||
SetObjectDefaults_Tpointer(in.Tp)
|
||||
}
|
||||
}
|
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/defaults.go
generated
vendored
Normal file
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/defaults.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2018 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 slices
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
return RegisterDefaults(scheme)
|
||||
}
|
||||
|
||||
func SetDefaults_Ttest(obj *Ttest) {
|
||||
if obj.BoolField == nil {
|
||||
obj.BoolField = new(bool)
|
||||
*obj.BoolField = true
|
||||
}
|
||||
}
|
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/doc.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2018 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:defaulter-gen=TypeMeta
|
||||
|
||||
// This is a test package.
|
||||
package slices // import "k8s.io/gengo/examples/defaulter-gen/_output_tests/slices"
|
37
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/type.go
generated
vendored
Normal file
37
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/type.go
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2018 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 slices
|
||||
|
||||
import (
|
||||
"k8s.io/gengo/examples/defaulter-gen/_output_tests/empty"
|
||||
)
|
||||
|
||||
// Only test
|
||||
type Ttest struct {
|
||||
empty.TypeMeta
|
||||
BoolField *bool
|
||||
}
|
||||
|
||||
type TtestList struct {
|
||||
empty.TypeMeta
|
||||
Items []Ttest
|
||||
}
|
||||
|
||||
type TtestPointerList struct {
|
||||
empty.TypeMeta
|
||||
Items []*Ttest
|
||||
}
|
55
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/zz_generated.go
generated
vendored
Normal file
55
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/zz_generated.go
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// +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 slices
|
||||
|
||||
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 {
|
||||
scheme.AddTypeDefaultingFunc(&Ttest{}, func(obj interface{}) { SetObjectDefaults_Ttest(obj.(*Ttest)) })
|
||||
scheme.AddTypeDefaultingFunc(&TtestList{}, func(obj interface{}) { SetObjectDefaults_TtestList(obj.(*TtestList)) })
|
||||
scheme.AddTypeDefaultingFunc(&TtestPointerList{}, func(obj interface{}) { SetObjectDefaults_TtestPointerList(obj.(*TtestPointerList)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Ttest(in *Ttest) {
|
||||
SetDefaults_Ttest(in)
|
||||
}
|
||||
|
||||
func SetObjectDefaults_TtestList(in *TtestList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_Ttest(a)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_TtestPointerList(in *TtestPointerList) {
|
||||
for i := range in.Items {
|
||||
a := in.Items[i]
|
||||
if a != nil {
|
||||
SetObjectDefaults_Ttest(a)
|
||||
}
|
||||
}
|
||||
}
|
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/defaults.go
generated
vendored
Normal file
32
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/defaults.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2018 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 wholepkg
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
return RegisterDefaults(scheme)
|
||||
}
|
||||
|
||||
func SetDefaults_Struct_Primitives(obj *Struct_Primitives) {
|
||||
if obj.BoolField == nil {
|
||||
obj.BoolField = new(bool)
|
||||
*obj.BoolField = true
|
||||
}
|
||||
}
|
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/doc.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2018 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:defaulter-gen=TypeMeta
|
||||
|
||||
// This is a test package.
|
||||
package wholepkg // import "k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg"
|
74
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/type.go
generated
vendored
Normal file
74
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/type.go
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
Copyright 2018 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 wholepkg
|
||||
|
||||
import (
|
||||
"k8s.io/gengo/examples/defaulter-gen/_output_tests/empty"
|
||||
)
|
||||
|
||||
// Only primitives
|
||||
type Struct_Primitives struct {
|
||||
empty.TypeMeta
|
||||
BoolField *bool
|
||||
IntField *int
|
||||
StringField *string
|
||||
FloatField *float64
|
||||
}
|
||||
type Struct_Primitives_Alias Struct_Primitives
|
||||
|
||||
type Struct_Struct_Primitives struct {
|
||||
empty.TypeMeta
|
||||
StructField Struct_Primitives
|
||||
}
|
||||
|
||||
//Pointer
|
||||
type Struct_Pointer struct {
|
||||
empty.TypeMeta
|
||||
PointerStructPrimitivesField Struct_Primitives
|
||||
PointerPointerStructPrimitivesField *Struct_Primitives
|
||||
PointerStructPrimitivesAliasField Struct_Primitives_Alias
|
||||
PointerPointerStructPrimitivesAliasField Struct_Primitives_Alias
|
||||
PointerStructStructPrimitives Struct_Struct_Primitives
|
||||
PointerPointerStructStructPrimitives *Struct_Struct_Primitives
|
||||
}
|
||||
|
||||
// Slices
|
||||
type Struct_Slices struct {
|
||||
empty.TypeMeta
|
||||
SliceStructPrimitivesField []Struct_Primitives
|
||||
SlicePointerStructPrimitivesField []*Struct_Primitives
|
||||
SliceStructPrimitivesAliasField []Struct_Primitives_Alias
|
||||
SlicePointerStructPrimitivesAliasField []*Struct_Primitives_Alias
|
||||
SliceStructStructPrimitives []Struct_Struct_Primitives
|
||||
SlicePointerStructStructPrimitives []*Struct_Struct_Primitives
|
||||
}
|
||||
|
||||
// Everything
|
||||
type Struct_Everything struct {
|
||||
empty.TypeMeta
|
||||
BoolPtrField *bool
|
||||
IntPtrField *int
|
||||
StringPtrField *string
|
||||
FloatPtrField *float64
|
||||
PointerStructField Struct_Pointer
|
||||
SliceBoolField []bool
|
||||
SliceByteField []byte
|
||||
SliceIntField []int
|
||||
SliceStringField []string
|
||||
SliceFloatField []float64
|
||||
SlicesStructField Struct_Slices
|
||||
}
|
84
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/zz_generated.go
generated
vendored
Normal file
84
vendor/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/zz_generated.go
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
// +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 wholepkg
|
||||
|
||||
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 {
|
||||
scheme.AddTypeDefaultingFunc(&Struct_Everything{}, func(obj interface{}) { SetObjectDefaults_Struct_Everything(obj.(*Struct_Everything)) })
|
||||
scheme.AddTypeDefaultingFunc(&Struct_Pointer{}, func(obj interface{}) { SetObjectDefaults_Struct_Pointer(obj.(*Struct_Pointer)) })
|
||||
scheme.AddTypeDefaultingFunc(&Struct_Primitives{}, func(obj interface{}) { SetObjectDefaults_Struct_Primitives(obj.(*Struct_Primitives)) })
|
||||
scheme.AddTypeDefaultingFunc(&Struct_Slices{}, func(obj interface{}) { SetObjectDefaults_Struct_Slices(obj.(*Struct_Slices)) })
|
||||
scheme.AddTypeDefaultingFunc(&Struct_Struct_Primitives{}, func(obj interface{}) { SetObjectDefaults_Struct_Struct_Primitives(obj.(*Struct_Struct_Primitives)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Struct_Everything(in *Struct_Everything) {
|
||||
SetObjectDefaults_Struct_Pointer(&in.PointerStructField)
|
||||
SetObjectDefaults_Struct_Slices(&in.SlicesStructField)
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Struct_Pointer(in *Struct_Pointer) {
|
||||
SetObjectDefaults_Struct_Primitives(&in.PointerStructPrimitivesField)
|
||||
if in.PointerPointerStructPrimitivesField != nil {
|
||||
SetObjectDefaults_Struct_Primitives(in.PointerPointerStructPrimitivesField)
|
||||
}
|
||||
SetObjectDefaults_Struct_Struct_Primitives(&in.PointerStructStructPrimitives)
|
||||
if in.PointerPointerStructStructPrimitives != nil {
|
||||
SetObjectDefaults_Struct_Struct_Primitives(in.PointerPointerStructStructPrimitives)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Struct_Primitives(in *Struct_Primitives) {
|
||||
SetDefaults_Struct_Primitives(in)
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Struct_Slices(in *Struct_Slices) {
|
||||
for i := range in.SliceStructPrimitivesField {
|
||||
a := &in.SliceStructPrimitivesField[i]
|
||||
SetObjectDefaults_Struct_Primitives(a)
|
||||
}
|
||||
for i := range in.SlicePointerStructPrimitivesField {
|
||||
a := in.SlicePointerStructPrimitivesField[i]
|
||||
if a != nil {
|
||||
SetObjectDefaults_Struct_Primitives(a)
|
||||
}
|
||||
}
|
||||
for i := range in.SliceStructStructPrimitives {
|
||||
a := &in.SliceStructStructPrimitives[i]
|
||||
SetObjectDefaults_Struct_Struct_Primitives(a)
|
||||
}
|
||||
for i := range in.SlicePointerStructStructPrimitives {
|
||||
a := in.SlicePointerStructStructPrimitives[i]
|
||||
if a != nil {
|
||||
SetObjectDefaults_Struct_Struct_Primitives(a)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_Struct_Struct_Primitives(in *Struct_Struct_Primitives) {
|
||||
SetObjectDefaults_Struct_Primitives(&in.StructField)
|
||||
}
|
Reference in New Issue
Block a user