Commit 583dfbb0 authored by deads2k's avatar deads2k

generated

parent 985d502e
...@@ -15,8 +15,7 @@ go_binary( ...@@ -15,8 +15,7 @@ go_binary(
srcs = ["main.go"], srcs = ["main.go"],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//cmd/kubernetes-discovery/pkg/cmd/server:go_default_library", "//cmd/kubernetes-discovery/discoverysummarizer:go_default_library",
"//pkg/kubectl/cmd/util:go_default_library", "//vendor:github.com/golang/glog",
"//pkg/util/logs:go_default_library",
], ],
) )
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"helpers.go",
"register.go",
"types.go",
"zz_generated.deepcopy.go",
],
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"//pkg/conversion:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/watch/versioned:go_default_library",
],
)
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = ["install.go"],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1:go_default_library",
"//pkg/apimachinery/announced:go_default_library",
"//pkg/util/sets:go_default_library",
],
)
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"register.go",
"types.generated.go",
"types.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"//pkg/conversion:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/types:go_default_library",
"//pkg/watch/versioned:go_default_library",
"//vendor:github.com/ugorji/go/codec",
],
)
/*
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.
*/
// ************************************************************
// DO NOT EDIT.
// THIS FILE IS AUTO-GENERATED BY codecgen.
// ************************************************************
package v1alpha1
import (
"errors"
"fmt"
codec1978 "github.com/ugorji/go/codec"
pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
pkg1_v1 "k8s.io/kubernetes/pkg/apis/meta/v1"
pkg3_types "k8s.io/kubernetes/pkg/types"
"reflect"
"runtime"
time "time"
)
const (
// ----- content types ----
codecSelferC_UTF81234 = 1
codecSelferC_RAW1234 = 0
// ----- value types used ----
codecSelferValueTypeArray1234 = 10
codecSelferValueTypeMap1234 = 9
// ----- containerStateValues ----
codecSelfer_containerMapKey1234 = 2
codecSelfer_containerMapValue1234 = 3
codecSelfer_containerMapEnd1234 = 4
codecSelfer_containerArrayElem1234 = 6
codecSelfer_containerArrayEnd1234 = 7
)
var (
codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
)
type codecSelfer1234 struct{}
func init() {
if codec1978.GenVersion != 5 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
5, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
var v0 pkg2_v1.ObjectMeta
var v1 pkg1_v1.TypeMeta
var v2 pkg3_types.UID
var v3 time.Time
_, _, _, _ = v0, v1, v2, v3
}
}
func (x *APIServiceList) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym1 := z.EncBinary()
_ = yym1
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [4]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[0] = x.Kind != ""
yyq2[1] = x.APIVersion != ""
yyq2[2] = true
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(4)
} else {
yynn2 = 1
for _, b := range yyq2 {
if b {
yynn2++
}
}
r.EncodeMapStart(yynn2)
yynn2 = 0
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[0] {
yym4 := z.EncBinary()
_ = yym4
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym5 := z.EncBinary()
_ = yym5
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[1] {
yym7 := z.EncBinary()
_ = yym7
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq2[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym8 := z.EncBinary()
_ = yym8
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq2[2] {
yy10 := &x.ListMeta
yym11 := z.EncBinary()
_ = yym11
if false {
} else if z.HasExtensions() && z.EncExt(yy10) {
} else {
z.EncFallback(yy10)
}
} else {
r.EncodeNil()
}
} else {
if yyq2[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy12 := &x.ListMeta
yym13 := z.EncBinary()
_ = yym13
if false {
} else if z.HasExtensions() && z.EncExt(yy12) {
} else {
z.EncFallback(yy12)
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Items == nil {
r.EncodeNil()
} else {
yym15 := z.EncBinary()
_ = yym15
if false {
} else {
h.encSliceAPIService(([]APIService)(x.Items), e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("items"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Items == nil {
r.EncodeNil()
} else {
yym16 := z.EncBinary()
_ = yym16
if false {
} else {
h.encSliceAPIService(([]APIService)(x.Items), e)
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *APIServiceList) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym17 := z.DecBinary()
_ = yym17
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct18 := r.ContainerType()
if yyct18 == codecSelferValueTypeMap1234 {
yyl18 := r.ReadMapStart()
if yyl18 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl18, d)
}
} else if yyct18 == codecSelferValueTypeArray1234 {
yyl18 := r.ReadArrayStart()
if yyl18 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl18, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *APIServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys19Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys19Slc
var yyhl19 bool = l >= 0
for yyj19 := 0; ; yyj19++ {
if yyhl19 {
if yyj19 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys19Slc = r.DecodeBytes(yys19Slc, true, true)
yys19 := string(yys19Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys19 {
case "kind":
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
case "apiVersion":
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
case "metadata":
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv22 := &x.ListMeta
yym23 := z.DecBinary()
_ = yym23
if false {
} else if z.HasExtensions() && z.DecExt(yyv22) {
} else {
z.DecFallback(yyv22, false)
}
}
case "items":
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv24 := &x.Items
yym25 := z.DecBinary()
_ = yym25
if false {
} else {
h.decSliceAPIService((*[]APIService)(yyv24), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys19)
} // end switch yys19
} // end for yyj19
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *APIServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj26 int
var yyb26 bool
var yyhl26 bool = l >= 0
yyj26++
if yyhl26 {
yyb26 = yyj26 > l
} else {
yyb26 = r.CheckBreak()
}
if yyb26 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj26++
if yyhl26 {
yyb26 = yyj26 > l
} else {
yyb26 = r.CheckBreak()
}
if yyb26 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj26++
if yyhl26 {
yyb26 = yyj26 > l
} else {
yyb26 = r.CheckBreak()
}
if yyb26 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ListMeta = pkg1_v1.ListMeta{}
} else {
yyv29 := &x.ListMeta
yym30 := z.DecBinary()
_ = yym30
if false {
} else if z.HasExtensions() && z.DecExt(yyv29) {
} else {
z.DecFallback(yyv29, false)
}
}
yyj26++
if yyhl26 {
yyb26 = yyj26 > l
} else {
yyb26 = r.CheckBreak()
}
if yyb26 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Items = nil
} else {
yyv31 := &x.Items
yym32 := z.DecBinary()
_ = yym32
if false {
} else {
h.decSliceAPIService((*[]APIService)(yyv31), d)
}
}
for {
yyj26++
if yyhl26 {
yyb26 = yyj26 > l
} else {
yyb26 = r.CheckBreak()
}
if yyb26 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj26-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *ServiceReference) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym33 := z.EncBinary()
_ = yym33
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep34 := !z.EncBinary()
yy2arr34 := z.EncBasicHandle().StructToArray
var yyq34 [2]bool
_, _, _ = yysep34, yyq34, yy2arr34
const yyr34 bool = false
yyq34[0] = x.Namespace != ""
yyq34[1] = x.Name != ""
var yynn34 int
if yyr34 || yy2arr34 {
r.EncodeArrayStart(2)
} else {
yynn34 = 0
for _, b := range yyq34 {
if b {
yynn34++
}
}
r.EncodeMapStart(yynn34)
yynn34 = 0
}
if yyr34 || yy2arr34 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq34[0] {
yym36 := z.EncBinary()
_ = yym36
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq34[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("namespace"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym37 := z.EncBinary()
_ = yym37
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
}
}
}
if yyr34 || yy2arr34 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq34[1] {
yym39 := z.EncBinary()
_ = yym39
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq34[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("name"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym40 := z.EncBinary()
_ = yym40
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Name))
}
}
}
if yyr34 || yy2arr34 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *ServiceReference) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym41 := z.DecBinary()
_ = yym41
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct42 := r.ContainerType()
if yyct42 == codecSelferValueTypeMap1234 {
yyl42 := r.ReadMapStart()
if yyl42 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl42, d)
}
} else if yyct42 == codecSelferValueTypeArray1234 {
yyl42 := r.ReadArrayStart()
if yyl42 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl42, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *ServiceReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys43Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys43Slc
var yyhl43 bool = l >= 0
for yyj43 := 0; ; yyj43++ {
if yyhl43 {
if yyj43 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys43Slc = r.DecodeBytes(yys43Slc, true, true)
yys43 := string(yys43Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys43 {
case "namespace":
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
case "name":
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys43)
} // end switch yys43
} // end for yyj43
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *ServiceReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj46 int
var yyb46 bool
var yyhl46 bool = l >= 0
yyj46++
if yyhl46 {
yyb46 = yyj46 > l
} else {
yyb46 = r.CheckBreak()
}
if yyb46 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Namespace = ""
} else {
x.Namespace = string(r.DecodeString())
}
yyj46++
if yyhl46 {
yyb46 = yyj46 > l
} else {
yyb46 = r.CheckBreak()
}
if yyb46 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = string(r.DecodeString())
}
for {
yyj46++
if yyhl46 {
yyb46 = yyj46 > l
} else {
yyb46 = r.CheckBreak()
}
if yyb46 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj46-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *APIServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym49 := z.EncBinary()
_ = yym49
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep50 := !z.EncBinary()
yy2arr50 := z.EncBasicHandle().StructToArray
var yyq50 [6]bool
_, _, _ = yysep50, yyq50, yy2arr50
const yyr50 bool = false
yyq50[1] = x.Group != ""
yyq50[2] = x.Version != ""
yyq50[3] = x.InsecureSkipTLSVerify != false
var yynn50 int
if yyr50 || yy2arr50 {
r.EncodeArrayStart(6)
} else {
yynn50 = 3
for _, b := range yyq50 {
if b {
yynn50++
}
}
r.EncodeMapStart(yynn50)
yynn50 = 0
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy52 := &x.Service
yy52.CodecEncodeSelf(e)
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("service"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy53 := &x.Service
yy53.CodecEncodeSelf(e)
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[1] {
yym55 := z.EncBinary()
_ = yym55
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Group))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq50[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("group"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym56 := z.EncBinary()
_ = yym56
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Group))
}
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[2] {
yym58 := z.EncBinary()
_ = yym58
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq50[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("version"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym59 := z.EncBinary()
_ = yym59
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Version))
}
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq50[3] {
yym61 := z.EncBinary()
_ = yym61
if false {
} else {
r.EncodeBool(bool(x.InsecureSkipTLSVerify))
}
} else {
r.EncodeBool(false)
}
} else {
if yyq50[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("insecureSkipTLSVerify"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym62 := z.EncBinary()
_ = yym62
if false {
} else {
r.EncodeBool(bool(x.InsecureSkipTLSVerify))
}
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.CABundle == nil {
r.EncodeNil()
} else {
yym64 := z.EncBinary()
_ = yym64
if false {
} else {
r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("caBundle"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.CABundle == nil {
r.EncodeNil()
} else {
yym65 := z.EncBinary()
_ = yym65
if false {
} else {
r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
}
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yym67 := z.EncBinary()
_ = yym67
if false {
} else {
r.EncodeInt(int64(x.Priority))
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("priority"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym68 := z.EncBinary()
_ = yym68
if false {
} else {
r.EncodeInt(int64(x.Priority))
}
}
if yyr50 || yy2arr50 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *APIServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym69 := z.DecBinary()
_ = yym69
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct70 := r.ContainerType()
if yyct70 == codecSelferValueTypeMap1234 {
yyl70 := r.ReadMapStart()
if yyl70 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl70, d)
}
} else if yyct70 == codecSelferValueTypeArray1234 {
yyl70 := r.ReadArrayStart()
if yyl70 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl70, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *APIServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys71Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys71Slc
var yyhl71 bool = l >= 0
for yyj71 := 0; ; yyj71++ {
if yyhl71 {
if yyj71 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys71Slc = r.DecodeBytes(yys71Slc, true, true)
yys71 := string(yys71Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys71 {
case "service":
if r.TryDecodeAsNil() {
x.Service = ServiceReference{}
} else {
yyv72 := &x.Service
yyv72.CodecDecodeSelf(d)
}
case "group":
if r.TryDecodeAsNil() {
x.Group = ""
} else {
x.Group = string(r.DecodeString())
}
case "version":
if r.TryDecodeAsNil() {
x.Version = ""
} else {
x.Version = string(r.DecodeString())
}
case "insecureSkipTLSVerify":
if r.TryDecodeAsNil() {
x.InsecureSkipTLSVerify = false
} else {
x.InsecureSkipTLSVerify = bool(r.DecodeBool())
}
case "caBundle":
if r.TryDecodeAsNil() {
x.CABundle = nil
} else {
yyv76 := &x.CABundle
yym77 := z.DecBinary()
_ = yym77
if false {
} else {
*yyv76 = r.DecodeBytes(*(*[]byte)(yyv76), false, false)
}
}
case "priority":
if r.TryDecodeAsNil() {
x.Priority = 0
} else {
x.Priority = int64(r.DecodeInt(64))
}
default:
z.DecStructFieldNotFound(-1, yys71)
} // end switch yys71
} // end for yyj71
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *APIServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj79 int
var yyb79 bool
var yyhl79 bool = l >= 0
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Service = ServiceReference{}
} else {
yyv80 := &x.Service
yyv80.CodecDecodeSelf(d)
}
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Group = ""
} else {
x.Group = string(r.DecodeString())
}
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Version = ""
} else {
x.Version = string(r.DecodeString())
}
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.InsecureSkipTLSVerify = false
} else {
x.InsecureSkipTLSVerify = bool(r.DecodeBool())
}
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.CABundle = nil
} else {
yyv84 := &x.CABundle
yym85 := z.DecBinary()
_ = yym85
if false {
} else {
*yyv84 = r.DecodeBytes(*(*[]byte)(yyv84), false, false)
}
}
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Priority = 0
} else {
x.Priority = int64(r.DecodeInt(64))
}
for {
yyj79++
if yyhl79 {
yyb79 = yyj79 > l
} else {
yyb79 = r.CheckBreak()
}
if yyb79 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj79-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *APIServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym87 := z.EncBinary()
_ = yym87
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep88 := !z.EncBinary()
yy2arr88 := z.EncBasicHandle().StructToArray
var yyq88 [0]bool
_, _, _ = yysep88, yyq88, yy2arr88
const yyr88 bool = false
var yynn88 int
if yyr88 || yy2arr88 {
r.EncodeArrayStart(0)
} else {
yynn88 = 0
for _, b := range yyq88 {
if b {
yynn88++
}
}
r.EncodeMapStart(yynn88)
yynn88 = 0
}
if yyr88 || yy2arr88 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *APIServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym89 := z.DecBinary()
_ = yym89
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct90 := r.ContainerType()
if yyct90 == codecSelferValueTypeMap1234 {
yyl90 := r.ReadMapStart()
if yyl90 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl90, d)
}
} else if yyct90 == codecSelferValueTypeArray1234 {
yyl90 := r.ReadArrayStart()
if yyl90 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl90, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *APIServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys91Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys91Slc
var yyhl91 bool = l >= 0
for yyj91 := 0; ; yyj91++ {
if yyhl91 {
if yyj91 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys91Slc = r.DecodeBytes(yys91Slc, true, true)
yys91 := string(yys91Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys91 {
default:
z.DecStructFieldNotFound(-1, yys91)
} // end switch yys91
} // end for yyj91
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *APIServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj92 int
var yyb92 bool
var yyhl92 bool = l >= 0
for {
yyj92++
if yyhl92 {
yyb92 = yyj92 > l
} else {
yyb92 = r.CheckBreak()
}
if yyb92 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj92-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x *APIService) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
yym93 := z.EncBinary()
_ = yym93
if false {
} else if z.HasExtensions() && z.EncExt(x) {
} else {
yysep94 := !z.EncBinary()
yy2arr94 := z.EncBasicHandle().StructToArray
var yyq94 [5]bool
_, _, _ = yysep94, yyq94, yy2arr94
const yyr94 bool = false
yyq94[0] = x.Kind != ""
yyq94[1] = x.APIVersion != ""
yyq94[2] = true
yyq94[3] = true
yyq94[4] = true
var yynn94 int
if yyr94 || yy2arr94 {
r.EncodeArrayStart(5)
} else {
yynn94 = 0
for _, b := range yyq94 {
if b {
yynn94++
}
}
r.EncodeMapStart(yynn94)
yynn94 = 0
}
if yyr94 || yy2arr94 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq94[0] {
yym96 := z.EncBinary()
_ = yym96
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq94[0] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("kind"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym97 := z.EncBinary()
_ = yym97
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
}
}
}
if yyr94 || yy2arr94 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq94[1] {
yym99 := z.EncBinary()
_ = yym99
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
} else {
r.EncodeString(codecSelferC_UTF81234, "")
}
} else {
if yyq94[1] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yym100 := z.EncBinary()
_ = yym100
if false {
} else {
r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
}
}
}
if yyr94 || yy2arr94 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq94[2] {
yy102 := &x.ObjectMeta
yy102.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq94[2] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("metadata"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy103 := &x.ObjectMeta
yy103.CodecEncodeSelf(e)
}
}
if yyr94 || yy2arr94 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq94[3] {
yy105 := &x.Spec
yy105.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq94[3] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("spec"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy106 := &x.Spec
yy106.CodecEncodeSelf(e)
}
}
if yyr94 || yy2arr94 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if yyq94[4] {
yy108 := &x.Status
yy108.CodecEncodeSelf(e)
} else {
r.EncodeNil()
}
} else {
if yyq94[4] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("status"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy109 := &x.Status
yy109.CodecEncodeSelf(e)
}
}
if yyr94 || yy2arr94 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
z.EncSendContainerState(codecSelfer_containerMapEnd1234)
}
}
}
}
func (x *APIService) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yym110 := z.DecBinary()
_ = yym110
if false {
} else if z.HasExtensions() && z.DecExt(x) {
} else {
yyct111 := r.ContainerType()
if yyct111 == codecSelferValueTypeMap1234 {
yyl111 := r.ReadMapStart()
if yyl111 == 0 {
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
} else {
x.codecDecodeSelfFromMap(yyl111, d)
}
} else if yyct111 == codecSelferValueTypeArray1234 {
yyl111 := r.ReadArrayStart()
if yyl111 == 0 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
x.codecDecodeSelfFromArray(yyl111, d)
}
} else {
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
}
}
}
func (x *APIService) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yys112Slc = z.DecScratchBuffer() // default slice to decode into
_ = yys112Slc
var yyhl112 bool = l >= 0
for yyj112 := 0; ; yyj112++ {
if yyhl112 {
if yyj112 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
z.DecSendContainerState(codecSelfer_containerMapKey1234)
yys112Slc = r.DecodeBytes(yys112Slc, true, true)
yys112 := string(yys112Slc)
z.DecSendContainerState(codecSelfer_containerMapValue1234)
switch yys112 {
case "kind":
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
case "apiVersion":
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
case "metadata":
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_v1.ObjectMeta{}
} else {
yyv115 := &x.ObjectMeta
yyv115.CodecDecodeSelf(d)
}
case "spec":
if r.TryDecodeAsNil() {
x.Spec = APIServiceSpec{}
} else {
yyv116 := &x.Spec
yyv116.CodecDecodeSelf(d)
}
case "status":
if r.TryDecodeAsNil() {
x.Status = APIServiceStatus{}
} else {
yyv117 := &x.Status
yyv117.CodecDecodeSelf(d)
}
default:
z.DecStructFieldNotFound(-1, yys112)
} // end switch yys112
} // end for yyj112
z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj118 int
var yyb118 bool
var yyhl118 bool = l >= 0
yyj118++
if yyhl118 {
yyb118 = yyj118 > l
} else {
yyb118 = r.CheckBreak()
}
if yyb118 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Kind = ""
} else {
x.Kind = string(r.DecodeString())
}
yyj118++
if yyhl118 {
yyb118 = yyj118 > l
} else {
yyb118 = r.CheckBreak()
}
if yyb118 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.APIVersion = ""
} else {
x.APIVersion = string(r.DecodeString())
}
yyj118++
if yyhl118 {
yyb118 = yyj118 > l
} else {
yyb118 = r.CheckBreak()
}
if yyb118 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.ObjectMeta = pkg2_v1.ObjectMeta{}
} else {
yyv121 := &x.ObjectMeta
yyv121.CodecDecodeSelf(d)
}
yyj118++
if yyhl118 {
yyb118 = yyj118 > l
} else {
yyb118 = r.CheckBreak()
}
if yyb118 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Spec = APIServiceSpec{}
} else {
yyv122 := &x.Spec
yyv122.CodecDecodeSelf(d)
}
yyj118++
if yyhl118 {
yyb118 = yyj118 > l
} else {
yyb118 = r.CheckBreak()
}
if yyb118 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Status = APIServiceStatus{}
} else {
yyv123 := &x.Status
yyv123.CodecDecodeSelf(d)
}
for {
yyj118++
if yyhl118 {
yyb118 = yyj118 > l
} else {
yyb118 = r.CheckBreak()
}
if yyb118 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj118-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) encSliceAPIService(v []APIService, e *codec1978.Encoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.EncodeArrayStart(len(v))
for _, yyv124 := range v {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
yy125 := &yyv124
yy125.CodecEncodeSelf(e)
}
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}
func (x codecSelfer1234) decSliceAPIService(v *[]APIService, d *codec1978.Decoder) {
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv126 := *v
yyh126, yyl126 := z.DecSliceHelperStart()
var yyc126 bool
if yyl126 == 0 {
if yyv126 == nil {
yyv126 = []APIService{}
yyc126 = true
} else if len(yyv126) != 0 {
yyv126 = yyv126[:0]
yyc126 = true
}
} else if yyl126 > 0 {
var yyrr126, yyrl126 int
var yyrt126 bool
if yyl126 > cap(yyv126) {
yyrg126 := len(yyv126) > 0
yyv2126 := yyv126
yyrl126, yyrt126 = z.DecInferLen(yyl126, z.DecBasicHandle().MaxInitLen, 368)
if yyrt126 {
if yyrl126 <= cap(yyv126) {
yyv126 = yyv126[:yyrl126]
} else {
yyv126 = make([]APIService, yyrl126)
}
} else {
yyv126 = make([]APIService, yyrl126)
}
yyc126 = true
yyrr126 = len(yyv126)
if yyrg126 {
copy(yyv126, yyv2126)
}
} else if yyl126 != len(yyv126) {
yyv126 = yyv126[:yyl126]
yyc126 = true
}
yyj126 := 0
for ; yyj126 < yyrr126; yyj126++ {
yyh126.ElemContainerState(yyj126)
if r.TryDecodeAsNil() {
yyv126[yyj126] = APIService{}
} else {
yyv127 := &yyv126[yyj126]
yyv127.CodecDecodeSelf(d)
}
}
if yyrt126 {
for ; yyj126 < yyl126; yyj126++ {
yyv126 = append(yyv126, APIService{})
yyh126.ElemContainerState(yyj126)
if r.TryDecodeAsNil() {
yyv126[yyj126] = APIService{}
} else {
yyv128 := &yyv126[yyj126]
yyv128.CodecDecodeSelf(d)
}
}
}
} else {
yyj126 := 0
for ; !r.CheckBreak(); yyj126++ {
if yyj126 >= len(yyv126) {
yyv126 = append(yyv126, APIService{}) // var yyz126 APIService
yyc126 = true
}
yyh126.ElemContainerState(yyj126)
if yyj126 < len(yyv126) {
if r.TryDecodeAsNil() {
yyv126[yyj126] = APIService{}
} else {
yyv129 := &yyv126[yyj126]
yyv129.CodecDecodeSelf(d)
}
} else {
z.DecSwallow()
}
}
if yyj126 < len(yyv126) {
yyv126 = yyv126[:yyj126]
yyc126 = true
} else if yyj126 == 0 && yyv126 == nil {
yyv126 = []APIService{}
yyc126 = true
}
}
yyh126.End()
if yyc126 {
*v = yyv126
}
}
// +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 conversion-gen. Do not edit it manually!
package v1alpha1
import (
apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration"
conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
unsafe "unsafe"
)
func init() {
SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_APIService_To_apiregistration_APIService,
Convert_apiregistration_APIService_To_v1alpha1_APIService,
Convert_v1alpha1_APIServiceList_To_apiregistration_APIServiceList,
Convert_apiregistration_APIServiceList_To_v1alpha1_APIServiceList,
Convert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec,
Convert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec,
Convert_v1alpha1_APIServiceStatus_To_apiregistration_APIServiceStatus,
Convert_apiregistration_APIServiceStatus_To_v1alpha1_APIServiceStatus,
Convert_v1alpha1_ServiceReference_To_apiregistration_ServiceReference,
Convert_apiregistration_ServiceReference_To_v1alpha1_ServiceReference,
)
}
func autoConvert_v1alpha1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
if err := Convert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha1_APIServiceStatus_To_apiregistration_APIServiceStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_v1alpha1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error {
return autoConvert_v1alpha1_APIService_To_apiregistration_APIService(in, out, s)
}
func autoConvert_apiregistration_APIService_To_v1alpha1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error {
// TODO: Inefficient conversion - can we improve it?
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
return err
}
if err := Convert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_apiregistration_APIServiceStatus_To_v1alpha1_APIServiceStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
func Convert_apiregistration_APIService_To_v1alpha1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error {
return autoConvert_apiregistration_APIService_To_v1alpha1_APIService(in, out, s)
}
func autoConvert_v1alpha1_APIServiceList_To_apiregistration_APIServiceList(in *APIServiceList, out *apiregistration.APIServiceList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]apiregistration.APIService)(unsafe.Pointer(&in.Items))
return nil
}
func Convert_v1alpha1_APIServiceList_To_apiregistration_APIServiceList(in *APIServiceList, out *apiregistration.APIServiceList, s conversion.Scope) error {
return autoConvert_v1alpha1_APIServiceList_To_apiregistration_APIServiceList(in, out, s)
}
func autoConvert_apiregistration_APIServiceList_To_v1alpha1_APIServiceList(in *apiregistration.APIServiceList, out *APIServiceList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]APIService)(unsafe.Pointer(&in.Items))
return nil
}
func Convert_apiregistration_APIServiceList_To_v1alpha1_APIServiceList(in *apiregistration.APIServiceList, out *APIServiceList, s conversion.Scope) error {
return autoConvert_apiregistration_APIServiceList_To_v1alpha1_APIServiceList(in, out, s)
}
func autoConvert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec(in *APIServiceSpec, out *apiregistration.APIServiceSpec, s conversion.Scope) error {
if err := Convert_v1alpha1_ServiceReference_To_apiregistration_ServiceReference(&in.Service, &out.Service, s); err != nil {
return err
}
out.Group = in.Group
out.Version = in.Version
out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify
out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
out.Priority = in.Priority
return nil
}
func Convert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec(in *APIServiceSpec, out *apiregistration.APIServiceSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec(in, out, s)
}
func autoConvert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec(in *apiregistration.APIServiceSpec, out *APIServiceSpec, s conversion.Scope) error {
if err := Convert_apiregistration_ServiceReference_To_v1alpha1_ServiceReference(&in.Service, &out.Service, s); err != nil {
return err
}
out.Group = in.Group
out.Version = in.Version
out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify
out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
out.Priority = in.Priority
return nil
}
func Convert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec(in *apiregistration.APIServiceSpec, out *APIServiceSpec, s conversion.Scope) error {
return autoConvert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec(in, out, s)
}
func autoConvert_v1alpha1_APIServiceStatus_To_apiregistration_APIServiceStatus(in *APIServiceStatus, out *apiregistration.APIServiceStatus, s conversion.Scope) error {
return nil
}
func Convert_v1alpha1_APIServiceStatus_To_apiregistration_APIServiceStatus(in *APIServiceStatus, out *apiregistration.APIServiceStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_APIServiceStatus_To_apiregistration_APIServiceStatus(in, out, s)
}
func autoConvert_apiregistration_APIServiceStatus_To_v1alpha1_APIServiceStatus(in *apiregistration.APIServiceStatus, out *APIServiceStatus, s conversion.Scope) error {
return nil
}
func Convert_apiregistration_APIServiceStatus_To_v1alpha1_APIServiceStatus(in *apiregistration.APIServiceStatus, out *APIServiceStatus, s conversion.Scope) error {
return autoConvert_apiregistration_APIServiceStatus_To_v1alpha1_APIServiceStatus(in, out, s)
}
func autoConvert_v1alpha1_ServiceReference_To_apiregistration_ServiceReference(in *ServiceReference, out *apiregistration.ServiceReference, s conversion.Scope) error {
out.Namespace = in.Namespace
out.Name = in.Name
return nil
}
func Convert_v1alpha1_ServiceReference_To_apiregistration_ServiceReference(in *ServiceReference, out *apiregistration.ServiceReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ServiceReference_To_apiregistration_ServiceReference(in, out, s)
}
func autoConvert_apiregistration_ServiceReference_To_v1alpha1_ServiceReference(in *apiregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error {
out.Namespace = in.Namespace
out.Name = in.Name
return nil
}
func Convert_apiregistration_ServiceReference_To_v1alpha1_ServiceReference(in *apiregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error {
return autoConvert_apiregistration_ServiceReference_To_v1alpha1_ServiceReference(in, out, s)
}
// +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 v1alpha1
import (
v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_APIService, InType: reflect.TypeOf(&APIService{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_APIServiceList, InType: reflect.TypeOf(&APIServiceList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_APIServiceSpec, InType: reflect.TypeOf(&APIServiceSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_APIServiceStatus, InType: reflect.TypeOf(&APIServiceStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ServiceReference, InType: reflect.TypeOf(&ServiceReference{})},
)
}
func DeepCopy_v1alpha1_APIService(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIService)
out := out.(*APIService)
out.TypeMeta = in.TypeMeta
if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_v1alpha1_APIServiceSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_v1alpha1_APIServiceList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIServiceList)
out := out.(*APIServiceList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]APIService, len(*in))
for i := range *in {
if err := DeepCopy_v1alpha1_APIService(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
}
func DeepCopy_v1alpha1_APIServiceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIServiceSpec)
out := out.(*APIServiceSpec)
out.Service = in.Service
out.Group = in.Group
out.Version = in.Version
out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify
if in.CABundle != nil {
in, out := &in.CABundle, &out.CABundle
*out = make([]byte, len(*in))
copy(*out, *in)
} else {
out.CABundle = nil
}
out.Priority = in.Priority
return nil
}
}
func DeepCopy_v1alpha1_APIServiceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIServiceStatus)
out := out.(*APIServiceStatus)
_ = in
_ = out
return nil
}
}
func DeepCopy_v1alpha1_ServiceReference(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ServiceReference)
out := out.(*ServiceReference)
out.Namespace = in.Namespace
out.Name = in.Name
return nil
}
}
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = ["validation.go"],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//pkg/api/validation:go_default_library",
"//pkg/api/validation/path:go_default_library",
"//pkg/util/validation:go_default_library",
"//pkg/util/validation/field:go_default_library",
],
)
// +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 apiregistration
import (
api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect"
)
func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiregistration_APIService, InType: reflect.TypeOf(&APIService{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiregistration_APIServiceList, InType: reflect.TypeOf(&APIServiceList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiregistration_APIServiceSpec, InType: reflect.TypeOf(&APIServiceSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiregistration_APIServiceStatus, InType: reflect.TypeOf(&APIServiceStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apiregistration_ServiceReference, InType: reflect.TypeOf(&ServiceReference{})},
)
}
func DeepCopy_apiregistration_APIService(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIService)
out := out.(*APIService)
out.TypeMeta = in.TypeMeta
if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
return err
}
if err := DeepCopy_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, c); err != nil {
return err
}
out.Status = in.Status
return nil
}
}
func DeepCopy_apiregistration_APIServiceList(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIServiceList)
out := out.(*APIServiceList)
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]APIService, len(*in))
for i := range *in {
if err := DeepCopy_apiregistration_APIService(&(*in)[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Items = nil
}
return nil
}
}
func DeepCopy_apiregistration_APIServiceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIServiceSpec)
out := out.(*APIServiceSpec)
out.Service = in.Service
out.Group = in.Group
out.Version = in.Version
out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify
if in.CABundle != nil {
in, out := &in.CABundle, &out.CABundle
*out = make([]byte, len(*in))
copy(*out, *in)
} else {
out.CABundle = nil
}
out.Priority = in.Priority
return nil
}
}
func DeepCopy_apiregistration_APIServiceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*APIServiceStatus)
out := out.(*APIServiceStatus)
_ = in
_ = out
return nil
}
}
func DeepCopy_apiregistration_ServiceReference(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ServiceReference)
out := out.(*ServiceReference)
out.Namespace = in.Namespace
out.Name = in.Name
return nil
}
}
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"clientset.go",
"doc.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//pkg/util/flowcontrol:go_default_library",
"//plugin/pkg/client/auth:go_default_library",
"//vendor:github.com/golang/glog",
],
)
/*
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.
*/
package internalclientset
import (
"github.com/golang/glog"
internalversionapiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion"
restclient "k8s.io/kubernetes/pkg/client/restclient"
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
"k8s.io/kubernetes/pkg/util/flowcontrol"
_ "k8s.io/kubernetes/plugin/pkg/client/auth"
)
type Interface interface {
Discovery() discovery.DiscoveryInterface
Apiregistration() internalversionapiregistration.ApiregistrationInterface
}
// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
*internalversionapiregistration.ApiregistrationClient
}
// Apiregistration retrieves the ApiregistrationClient
func (c *Clientset) Apiregistration() internalversionapiregistration.ApiregistrationInterface {
if c == nil {
return nil
}
return c.ApiregistrationClient
}
// Discovery retrieves the DiscoveryClient
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return c.DiscoveryClient
}
// NewForConfig creates a new Clientset for the given config.
func NewForConfig(c *restclient.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
}
var clientset Clientset
var err error
clientset.ApiregistrationClient, err = internalversionapiregistration.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
if err != nil {
glog.Errorf("failed to create the DiscoveryClient: %v", err)
return nil, err
}
return &clientset, nil
}
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *Clientset {
var clientset Clientset
clientset.ApiregistrationClient = internalversionapiregistration.NewForConfigOrDie(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &clientset
}
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var clientset Clientset
clientset.ApiregistrationClient = internalversionapiregistration.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
/*
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 package is generated by client-gen with arguments: --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// This package has the automatically generated clientset.
package internalclientset
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"clientset_generated.go",
"doc.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset:go_default_library",
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library",
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake:go_default_library",
"//pkg/api:go_default_library",
"//pkg/apimachinery/registered:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//pkg/client/typed/discovery/fake:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/watch:go_default_library",
],
)
/*
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.
*/
package fake
import (
clientset "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset"
internalversionapiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion"
fakeinternalversionapiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apimachinery/registered"
"k8s.io/kubernetes/pkg/client/testing/core"
"k8s.io/kubernetes/pkg/client/typed/discovery"
fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/watch"
)
// NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder())
for _, obj := range objects {
if err := o.Add(obj); err != nil {
panic(err)
}
}
fakePtr := core.Fake{}
fakePtr.AddReactor("*", "*", core.ObjectReaction(o, registered.RESTMapper()))
fakePtr.AddWatchReactor("*", core.DefaultWatchReactor(watch.NewFake(), nil))
return &Clientset{fakePtr}
}
// Clientset implements clientset.Interface. Meant to be embedded into a
// struct to get a default implementation. This makes faking out just the method
// you want to test easier.
type Clientset struct {
core.Fake
}
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
}
var _ clientset.Interface = &Clientset{}
// Apiregistration retrieves the ApiregistrationClient
func (c *Clientset) Apiregistration() internalversionapiregistration.ApiregistrationInterface {
return &fakeinternalversionapiregistration.FakeApiregistration{Fake: &c.Fake}
}
/*
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 package is generated by client-gen with arguments: --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// This package has the automatically generated fake clientset.
package fake
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"apiregistration_client.go",
"apiservice.go",
"doc.go",
"generated_expansion.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//pkg/api:go_default_library",
"//pkg/apimachinery/registered:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/watch:go_default_library",
],
)
/*
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.
*/
package internalversion
import (
api "k8s.io/kubernetes/pkg/api"
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
restclient "k8s.io/kubernetes/pkg/client/restclient"
)
type ApiregistrationInterface interface {
RESTClient() restclient.Interface
APIServicesGetter
}
// ApiregistrationClient is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
type ApiregistrationClient struct {
restClient restclient.Interface
}
func (c *ApiregistrationClient) APIServices() APIServiceInterface {
return newAPIServices(c)
}
// NewForConfig creates a new ApiregistrationClient for the given config.
func NewForConfig(c *restclient.Config) (*ApiregistrationClient, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &ApiregistrationClient{client}, nil
}
// NewForConfigOrDie creates a new ApiregistrationClient for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *ApiregistrationClient {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new ApiregistrationClient for the given RESTClient.
func New(c restclient.Interface) *ApiregistrationClient {
return &ApiregistrationClient{c}
}
func setConfigDefaults(config *restclient.Config) error {
// if apiregistration group is not registered, return an error
g, err := registered.Group("apiregistration.k8s.io")
if err != nil {
return err
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
}
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
copyGroupVersion := g.GroupVersion
config.GroupVersion = &copyGroupVersion
}
config.NegotiatedSerializer = api.Codecs
if config.QPS == 0 {
config.QPS = 5
}
if config.Burst == 0 {
config.Burst = 10
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ApiregistrationClient) RESTClient() restclient.Interface {
if c == nil {
return nil
}
return c.restClient
}
/*
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.
*/
package internalversion
import (
apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration"
api "k8s.io/kubernetes/pkg/api"
restclient "k8s.io/kubernetes/pkg/client/restclient"
watch "k8s.io/kubernetes/pkg/watch"
)
// APIServicesGetter has a method to return a APIServiceInterface.
// A group's client should implement this interface.
type APIServicesGetter interface {
APIServices() APIServiceInterface
}
// APIServiceInterface has methods to work with APIService resources.
type APIServiceInterface interface {
Create(*apiregistration.APIService) (*apiregistration.APIService, error)
Update(*apiregistration.APIService) (*apiregistration.APIService, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
Get(name string) (*apiregistration.APIService, error)
List(opts api.ListOptions) (*apiregistration.APIServiceList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error)
APIServiceExpansion
}
// aPIServices implements APIServiceInterface
type aPIServices struct {
client restclient.Interface
}
// newAPIServices returns a APIServices
func newAPIServices(c *ApiregistrationClient) *aPIServices {
return &aPIServices{
client: c.RESTClient(),
}
}
// Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any.
func (c *aPIServices) Create(aPIService *apiregistration.APIService) (result *apiregistration.APIService, err error) {
result = &apiregistration.APIService{}
err = c.client.Post().
Resource("apiservices").
Body(aPIService).
Do().
Into(result)
return
}
// Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any.
func (c *aPIServices) Update(aPIService *apiregistration.APIService) (result *apiregistration.APIService, err error) {
result = &apiregistration.APIService{}
err = c.client.Put().
Resource("apiservices").
Name(aPIService.Name).
Body(aPIService).
Do().
Into(result)
return
}
// Delete takes name of the aPIService and deletes it. Returns an error if one occurs.
func (c *aPIServices) Delete(name string, options *api.DeleteOptions) error {
return c.client.Delete().
Resource("apiservices").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *aPIServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
return c.client.Delete().
Resource("apiservices").
VersionedParams(&listOptions, api.ParameterCodec).
Body(options).
Do().
Error()
}
// Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any.
func (c *aPIServices) Get(name string) (result *apiregistration.APIService, err error) {
result = &apiregistration.APIService{}
err = c.client.Get().
Resource("apiservices").
Name(name).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of APIServices that match those selectors.
func (c *aPIServices) List(opts api.ListOptions) (result *apiregistration.APIServiceList, err error) {
result = &apiregistration.APIServiceList{}
err = c.client.Get().
Resource("apiservices").
VersionedParams(&opts, api.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *aPIServices) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("apiservices").
VersionedParams(&opts, api.ParameterCodec).
Watch()
}
// Patch applies the patch and returns the patched aPIService.
func (c *aPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) {
result = &apiregistration.APIService{}
err = c.client.Patch(pt).
Resource("apiservices").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}
/*
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 package is generated by client-gen with arguments: --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// This package has the automatically generated typed clients.
package internalversion
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_apiregistration_client.go",
"fake_apiservice.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library",
"//pkg/api:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//pkg/labels:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/watch:go_default_library",
],
)
/*
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 package is generated by client-gen with arguments: --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// Package fake has the automatically generated clients.
package fake
/*
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.
*/
package fake
import (
internalversion "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
type FakeApiregistration struct {
*core.Fake
}
func (c *FakeApiregistration) APIServices() internalversion.APIServiceInterface {
return &FakeAPIServices{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeApiregistration) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
return ret
}
/*
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.
*/
package fake
import (
apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration"
api "k8s.io/kubernetes/pkg/api"
core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels"
schema "k8s.io/kubernetes/pkg/runtime/schema"
watch "k8s.io/kubernetes/pkg/watch"
)
// FakeAPIServices implements APIServiceInterface
type FakeAPIServices struct {
Fake *FakeApiregistration
}
var apiservicesResource = schema.GroupVersionResource{Group: "apiregistration.k8s.io", Version: "", Resource: "apiservices"}
func (c *FakeAPIServices) Create(aPIService *apiregistration.APIService) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(apiservicesResource, aPIService), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
func (c *FakeAPIServices) Update(aPIService *apiregistration.APIService) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootUpdateAction(apiservicesResource, aPIService), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
func (c *FakeAPIServices) Delete(name string, options *api.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewRootDeleteAction(apiservicesResource, name), &apiregistration.APIService{})
return err
}
func (c *FakeAPIServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
action := core.NewRootDeleteCollectionAction(apiservicesResource, listOptions)
_, err := c.Fake.Invokes(action, &apiregistration.APIServiceList{})
return err
}
func (c *FakeAPIServices) Get(name string) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(apiservicesResource, name), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
func (c *FakeAPIServices) List(opts api.ListOptions) (result *apiregistration.APIServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(apiservicesResource, opts), &apiregistration.APIServiceList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &apiregistration.APIServiceList{}
for _, item := range obj.(*apiregistration.APIServiceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *FakeAPIServices) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(apiservicesResource, opts))
}
// Patch applies the patch and returns the patched aPIService.
func (c *FakeAPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(apiservicesResource, name, data, subresources...), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
/*
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.
*/
package internalversion
type APIServiceExpansion interface{}
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"clientset.go",
"doc.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//pkg/util/flowcontrol:go_default_library",
"//plugin/pkg/client/auth:go_default_library",
"//vendor:github.com/golang/glog",
],
)
/*
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.
*/
package release_1_5
import (
"github.com/golang/glog"
v1alpha1apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
"k8s.io/kubernetes/pkg/util/flowcontrol"
_ "k8s.io/kubernetes/plugin/pkg/client/auth"
)
type Interface interface {
Discovery() discovery.DiscoveryInterface
ApiregistrationV1alpha1() v1alpha1apiregistration.ApiregistrationV1alpha1Interface
// Deprecated: please explicitly pick a version if possible.
Apiregistration() v1alpha1apiregistration.ApiregistrationV1alpha1Interface
}
// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
*v1alpha1apiregistration.ApiregistrationV1alpha1Client
}
// ApiregistrationV1alpha1 retrieves the ApiregistrationV1alpha1Client
func (c *Clientset) ApiregistrationV1alpha1() v1alpha1apiregistration.ApiregistrationV1alpha1Interface {
if c == nil {
return nil
}
return c.ApiregistrationV1alpha1Client
}
// Deprecated: Apiregistration retrieves the default version of ApiregistrationClient.
// Please explicitly pick a version.
func (c *Clientset) Apiregistration() v1alpha1apiregistration.ApiregistrationV1alpha1Interface {
if c == nil {
return nil
}
return c.ApiregistrationV1alpha1Client
}
// Discovery retrieves the DiscoveryClient
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return c.DiscoveryClient
}
// NewForConfig creates a new Clientset for the given config.
func NewForConfig(c *restclient.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
}
var clientset Clientset
var err error
clientset.ApiregistrationV1alpha1Client, err = v1alpha1apiregistration.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
if err != nil {
glog.Errorf("failed to create the DiscoveryClient: %v", err)
return nil, err
}
return &clientset, nil
}
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *Clientset {
var clientset Clientset
clientset.ApiregistrationV1alpha1Client = v1alpha1apiregistration.NewForConfigOrDie(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &clientset
}
// New creates a new Clientset for the given RESTClient.
func New(c restclient.Interface) *Clientset {
var clientset Clientset
clientset.ApiregistrationV1alpha1Client = v1alpha1apiregistration.New(c)
clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
/*
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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/v1alpha1] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// This package has the automatically generated clientset.
package release_1_5
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"clientset_generated.go",
"doc.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5:go_default_library",
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1:go_default_library",
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1/fake:go_default_library",
"//pkg/api:go_default_library",
"//pkg/apimachinery/registered:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//pkg/client/typed/discovery:go_default_library",
"//pkg/client/typed/discovery/fake:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/watch:go_default_library",
],
)
/*
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.
*/
package fake
import (
clientset "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5"
v1alpha1apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1"
fakev1alpha1apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1/fake"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apimachinery/registered"
"k8s.io/kubernetes/pkg/client/testing/core"
"k8s.io/kubernetes/pkg/client/typed/discovery"
fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/watch"
)
// NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder())
for _, obj := range objects {
if err := o.Add(obj); err != nil {
panic(err)
}
}
fakePtr := core.Fake{}
fakePtr.AddReactor("*", "*", core.ObjectReaction(o, registered.RESTMapper()))
fakePtr.AddWatchReactor("*", core.DefaultWatchReactor(watch.NewFake(), nil))
return &Clientset{fakePtr}
}
// Clientset implements clientset.Interface. Meant to be embedded into a
// struct to get a default implementation. This makes faking out just the method
// you want to test easier.
type Clientset struct {
core.Fake
}
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
}
var _ clientset.Interface = &Clientset{}
// ApiregistrationV1alpha1 retrieves the ApiregistrationV1alpha1Client
func (c *Clientset) ApiregistrationV1alpha1() v1alpha1apiregistration.ApiregistrationV1alpha1Interface {
return &fakev1alpha1apiregistration.FakeApiregistrationV1alpha1{Fake: &c.Fake}
}
// Apiregistration retrieves the ApiregistrationV1alpha1Client
func (c *Clientset) Apiregistration() v1alpha1apiregistration.ApiregistrationV1alpha1Interface {
return &fakev1alpha1apiregistration.FakeApiregistrationV1alpha1{Fake: &c.Fake}
}
/*
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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/v1alpha1] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// This package has the automatically generated fake clientset.
package fake
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"apiregistration_client.go",
"apiservice.go",
"doc.go",
"generated_expansion.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/apimachinery/registered:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/runtime/serializer:go_default_library",
"//pkg/watch:go_default_library",
],
)
/*
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.
*/
package v1alpha1
import (
fmt "fmt"
api "k8s.io/kubernetes/pkg/api"
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
restclient "k8s.io/kubernetes/pkg/client/restclient"
schema "k8s.io/kubernetes/pkg/runtime/schema"
serializer "k8s.io/kubernetes/pkg/runtime/serializer"
)
type ApiregistrationV1alpha1Interface interface {
RESTClient() restclient.Interface
APIServicesGetter
}
// ApiregistrationV1alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
type ApiregistrationV1alpha1Client struct {
restClient restclient.Interface
}
func (c *ApiregistrationV1alpha1Client) APIServices() APIServiceInterface {
return newAPIServices(c)
}
// NewForConfig creates a new ApiregistrationV1alpha1Client for the given config.
func NewForConfig(c *restclient.Config) (*ApiregistrationV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &ApiregistrationV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new ApiregistrationV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *ApiregistrationV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new ApiregistrationV1alpha1Client for the given RESTClient.
func New(c restclient.Interface) *ApiregistrationV1alpha1Client {
return &ApiregistrationV1alpha1Client{c}
}
func setConfigDefaults(config *restclient.Config) error {
gv, err := schema.ParseGroupVersion("apiregistration.k8s.io/v1alpha1")
if err != nil {
return err
}
// if apiregistration.k8s.io/v1alpha1 is not enabled, return an error
if !registered.IsEnabledVersion(gv) {
return fmt.Errorf("apiregistration.k8s.io/v1alpha1 is not enabled")
}
config.APIPath = "/apis"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
}
copyGroupVersion := gv
config.GroupVersion = &copyGroupVersion
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ApiregistrationV1alpha1Client) RESTClient() restclient.Interface {
if c == nil {
return nil
}
return c.restClient
}
/*
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.
*/
package v1alpha1
import (
v1alpha1 "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
watch "k8s.io/kubernetes/pkg/watch"
)
// APIServicesGetter has a method to return a APIServiceInterface.
// A group's client should implement this interface.
type APIServicesGetter interface {
APIServices() APIServiceInterface
}
// APIServiceInterface has methods to work with APIService resources.
type APIServiceInterface interface {
Create(*v1alpha1.APIService) (*v1alpha1.APIService, error)
Update(*v1alpha1.APIService) (*v1alpha1.APIService, error)
UpdateStatus(*v1alpha1.APIService) (*v1alpha1.APIService, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1alpha1.APIService, error)
List(opts v1.ListOptions) (*v1alpha1.APIServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error)
APIServiceExpansion
}
// aPIServices implements APIServiceInterface
type aPIServices struct {
client restclient.Interface
}
// newAPIServices returns a APIServices
func newAPIServices(c *ApiregistrationV1alpha1Client) *aPIServices {
return &aPIServices{
client: c.RESTClient(),
}
}
// Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any.
func (c *aPIServices) Create(aPIService *v1alpha1.APIService) (result *v1alpha1.APIService, err error) {
result = &v1alpha1.APIService{}
err = c.client.Post().
Resource("apiservices").
Body(aPIService).
Do().
Into(result)
return
}
// Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any.
func (c *aPIServices) Update(aPIService *v1alpha1.APIService) (result *v1alpha1.APIService, err error) {
result = &v1alpha1.APIService{}
err = c.client.Put().
Resource("apiservices").
Name(aPIService.Name).
Body(aPIService).
Do().
Into(result)
return
}
func (c *aPIServices) UpdateStatus(aPIService *v1alpha1.APIService) (result *v1alpha1.APIService, err error) {
result = &v1alpha1.APIService{}
err = c.client.Put().
Resource("apiservices").
Name(aPIService.Name).
SubResource("status").
Body(aPIService).
Do().
Into(result)
return
}
// Delete takes name of the aPIService and deletes it. Returns an error if one occurs.
func (c *aPIServices) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("apiservices").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *aPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Resource("apiservices").
VersionedParams(&listOptions, api.ParameterCodec).
Body(options).
Do().
Error()
}
// Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any.
func (c *aPIServices) Get(name string) (result *v1alpha1.APIService, err error) {
result = &v1alpha1.APIService{}
err = c.client.Get().
Resource("apiservices").
Name(name).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of APIServices that match those selectors.
func (c *aPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList, err error) {
result = &v1alpha1.APIServiceList{}
err = c.client.Get().
Resource("apiservices").
VersionedParams(&opts, api.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("apiservices").
VersionedParams(&opts, api.ParameterCodec).
Watch()
}
// Patch applies the patch and returns the patched aPIService.
func (c *aPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) {
result = &v1alpha1.APIService{}
err = c.client.Patch(pt).
Resource("apiservices").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}
/*
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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/v1alpha1] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// This package has the automatically generated typed clients.
package v1alpha1
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_apiregistration_client.go",
"fake_apiservice.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1:go_default_library",
"//cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library",
"//pkg/labels:go_default_library",
"//pkg/runtime/schema:go_default_library",
"//pkg/watch:go_default_library",
],
)
/*
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 package is generated by client-gen with arguments: --clientset-name=release_1_5 --clientset-path=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated --input=[apiregistration/v1alpha1] --input-base=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis
// Package fake has the automatically generated clients.
package fake
/*
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.
*/
package fake
import (
v1alpha1 "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/clientset_generated/release_1_5/typed/apiregistration/v1alpha1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)
type FakeApiregistrationV1alpha1 struct {
*core.Fake
}
func (c *FakeApiregistrationV1alpha1) APIServices() v1alpha1.APIServiceInterface {
return &FakeAPIServices{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeApiregistrationV1alpha1) RESTClient() restclient.Interface {
var ret *restclient.RESTClient
return ret
}
/*
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.
*/
package fake
import (
v1alpha1 "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1"
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels"
schema "k8s.io/kubernetes/pkg/runtime/schema"
watch "k8s.io/kubernetes/pkg/watch"
)
// FakeAPIServices implements APIServiceInterface
type FakeAPIServices struct {
Fake *FakeApiregistrationV1alpha1
}
var apiservicesResource = schema.GroupVersionResource{Group: "apiregistration.k8s.io", Version: "v1alpha1", Resource: "apiservices"}
func (c *FakeAPIServices) Create(aPIService *v1alpha1.APIService) (result *v1alpha1.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(apiservicesResource, aPIService), &v1alpha1.APIService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.APIService), err
}
func (c *FakeAPIServices) Update(aPIService *v1alpha1.APIService) (result *v1alpha1.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootUpdateAction(apiservicesResource, aPIService), &v1alpha1.APIService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.APIService), err
}
func (c *FakeAPIServices) UpdateStatus(aPIService *v1alpha1.APIService) (*v1alpha1.APIService, error) {
obj, err := c.Fake.
Invokes(core.NewRootUpdateSubresourceAction(apiservicesResource, "status", aPIService), &v1alpha1.APIService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.APIService), err
}
func (c *FakeAPIServices) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewRootDeleteAction(apiservicesResource, name), &v1alpha1.APIService{})
return err
}
func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(apiservicesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.APIServiceList{})
return err
}
func (c *FakeAPIServices) Get(name string) (result *v1alpha1.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(apiservicesResource, name), &v1alpha1.APIService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.APIService), err
}
func (c *FakeAPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(apiservicesResource, opts), &v1alpha1.APIServiceList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.APIServiceList{}
for _, item := range obj.(*v1alpha1.APIServiceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested aPIServices.
func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(apiservicesResource, opts))
}
// Patch applies the patch and returns the patched aPIService.
func (c *FakeAPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(apiservicesResource, name, data, subresources...), &v1alpha1.APIService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.APIService), err
}
/*
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.
*/
package v1alpha1
type APIServiceExpansion interface{}
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"apiservice.go",
"expansion_generated.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//pkg/api:go_default_library",
"//pkg/api/errors:go_default_library",
"//pkg/client/cache:go_default_library",
"//pkg/labels:go_default_library",
],
)
/*
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 automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration,k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1] --output-package=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/listers
package internalversion
import (
apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration"
api "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/labels"
)
// APIServiceLister helps list APIServices.
type APIServiceLister interface {
// List lists all APIServices in the indexer.
List(selector labels.Selector) (ret []*apiregistration.APIService, err error)
// Get retrieves the APIService from the index for a given name.
Get(name string) (*apiregistration.APIService, error)
APIServiceListerExpansion
}
// aPIServiceLister implements the APIServiceLister interface.
type aPIServiceLister struct {
indexer cache.Indexer
}
// NewAPIServiceLister returns a new APIServiceLister.
func NewAPIServiceLister(indexer cache.Indexer) APIServiceLister {
return &aPIServiceLister{indexer: indexer}
}
// List lists all APIServices in the indexer.
func (s *aPIServiceLister) List(selector labels.Selector) (ret []*apiregistration.APIService, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*apiregistration.APIService))
})
return ret, err
}
// Get retrieves the APIService from the index for a given name.
func (s *aPIServiceLister) Get(name string) (*apiregistration.APIService, error) {
key := &apiregistration.APIService{ObjectMeta: api.ObjectMeta{Name: name}}
obj, exists, err := s.indexer.Get(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(apiregistration.Resource("apiservice"), name)
}
return obj.(*apiregistration.APIService), nil
}
/*
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 automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration,k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1] --output-package=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/listers
package internalversion
// APIServiceListerExpansion allows custom methods to be added to
// APIServiceLister.
type APIServiceListerExpansion interface{}
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
"go_test",
"cgo_library",
)
go_library(
name = "go_default_library",
srcs = [
"apiservice.go",
"expansion_generated.go",
],
tags = ["automanaged"],
deps = [
"//cmd/kubernetes-discovery/pkg/apis/apiregistration:go_default_library",
"//cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1:go_default_library",
"//pkg/api/errors:go_default_library",
"//pkg/api/v1:go_default_library",
"//pkg/client/cache:go_default_library",
"//pkg/labels:go_default_library",
],
)
/*
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 automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration,k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1] --output-package=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/listers
package v1alpha1
import (
apiregistration "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration"
v1alpha1 "k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1"
"k8s.io/kubernetes/pkg/api/errors"
v1 "k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/labels"
)
// APIServiceLister helps list APIServices.
type APIServiceLister interface {
// List lists all APIServices in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.APIService, err error)
// Get retrieves the APIService from the index for a given name.
Get(name string) (*v1alpha1.APIService, error)
APIServiceListerExpansion
}
// aPIServiceLister implements the APIServiceLister interface.
type aPIServiceLister struct {
indexer cache.Indexer
}
// NewAPIServiceLister returns a new APIServiceLister.
func NewAPIServiceLister(indexer cache.Indexer) APIServiceLister {
return &aPIServiceLister{indexer: indexer}
}
// List lists all APIServices in the indexer.
func (s *aPIServiceLister) List(selector labels.Selector) (ret []*v1alpha1.APIService, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.APIService))
})
return ret, err
}
// Get retrieves the APIService from the index for a given name.
func (s *aPIServiceLister) Get(name string) (*v1alpha1.APIService, error) {
key := &v1alpha1.APIService{ObjectMeta: v1.ObjectMeta{Name: name}}
obj, exists, err := s.indexer.Get(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(apiregistration.Resource("apiservice"), name)
}
return obj.(*v1alpha1.APIService), nil
}
/*
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 automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration,k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/apis/apiregistration/v1alpha1] --output-package=k8s.io/kubernetes/cmd/kubernetes-discovery/pkg/client/listers
package v1alpha1
// APIServiceListerExpansion allows custom methods to be added to
// APIServiceLister.
type APIServiceListerExpansion interface{}
...@@ -22,6 +22,9 @@ cmd/kubeadm/app/apis/kubeadm/install ...@@ -22,6 +22,9 @@ cmd/kubeadm/app/apis/kubeadm/install
cmd/kubectl cmd/kubectl
cmd/kubelet cmd/kubelet
cmd/kubernetes-discovery cmd/kubernetes-discovery
cmd/kubernetes-discovery/pkg/apis/apiregistration/install
cmd/kubernetes-discovery/pkg/client/listers/apiregistration/internalversion
cmd/kubernetes-discovery/pkg/client/listers/apiregistration/v1alpha1
cmd/libs/go2idl/client-gen cmd/libs/go2idl/client-gen
cmd/libs/go2idl/client-gen/generators cmd/libs/go2idl/client-gen/generators
cmd/libs/go2idl/client-gen/test_apis/testgroup/install cmd/libs/go2idl/client-gen/test_apis/testgroup/install
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment